Re:A transformer-based method for zero and few-shot biomedic...
by leobg on Thursday May 11, 2023 @12:54PM
(#35904871)
Regex? Just use Langchain agents, bro!
:-P
Re:A transformer-based method for zero and few-shot biomedic...
by rickette on Thursday May 11, 2023 @01:05PM
(#35905021)
I've also got remarkably good results pushing regular expressions to the max to perform "NER", while other more fancy (ML) solutions failed. So don't rule them out.
Re:A transformer-based method for zero and few-shot biomedic...
by chaxor on Thursday May 11, 2023 @04:54PM
(#35908248)
Perhaps... but If that's true, you're likely not doing what is typically referred to as NER in computational linguistics.
Either that or yours going with a type of 'dictionary based' regex system, which gets typically high recall, low precision.
Several years ago, when manual FE was a thing, this would be fed to a CRF model or some other Markov like model, perhaps even an LSTM prior to W2V, and be used as a feature - along with other things like 'ends in ly' etc.
There's always tradeoffs. Regex is fast, linear CRFs are quite fast too. Simple LSTMs are fast-ish, as well as BERT-like systems, can offer a decent tradeoff in speed/performance. LLMs are much slower, and need some type of distill step by step to get anything very useful out (for task specific model).
Ultimately, you're right in that regexes along with other older techniques should be understood and weighed for what is the optimal solution for the task.
So clearly you need to have some very good hardware to process all of it.
However, compare that with some of the simpler encoder models that have far fewer params that are targeted for specific tasks. These systems can plow through 10^5 or 10^6 tokens per second. So now that 16 years is a week.
This is why small models that are task specific are so important. They make much more possible in reasonable time frames and reduce CO2 emissions by orders of magnitude. Along the same lines of "why use an LLM to extract everywhere the string 'Starbucks4{:digit:}' appears in text when you can use a regex?". You can get the output in a few seconds on billions of articles with a DB, whereas an LLM would take more than a decade.