top | item 32057092

(no title)

lol1lol | 3 years ago

It's one of the overly abstracted libraries. Too hard to tweak something. HuggingFace Transformers did a better job at keeping things simpler.

discuss

order

schmmd|3 years ago

AllenNLP started before transformers, and so it provided high level abstractions to experiment with model architectures, which is where much of NLP research was happening at the time. Transformers definitely changed the playing field, as it became the basis for most models!

lol1lol|3 years ago

I think you are missing the point.

The hackability quotient of AllenNLP is way low.

I'll give you specific examples where AllenNLP overdid it, while HuggingFace was better just by keeping it simple.

Vocabulary class. HuggingFace just used a python dictionary. I can't think of one person who said they needed higher level abstraction. Turns out a python dictionary is pickle-able, saving to a text file is one line code, while the AbstractSinglettonProxyVocabulary is not and no one wants to care in the first place.

Tokenizer class. HuggingFace just used a python dictionary to return strings and integers. I can't think of one person frustrated by it. It's printable, picklable, and everything in between people can fiddle with. And boy where do I start about AllenNLP's overdoing of Tokenizers.

Trainer class. vs. HuggingFace example scripts. The scripts are just much more readable, tweakable, debuggable etc. HF didn't bother with AbstractBaseTrainer class bs.

It just shows they never understood the playing field.

- First, I don't think anyone thought AllenNLP was a good choice for high performance production systems. Again HuggingFace clearly understood the problem and built a fast tokenizer in Rust.

- A math, physics, linguistics, or even CS PhD student who know basics of coding would prefer bare bone scripts. They just want to hack it off and focus on research. Writing good code is not their objective.

Just my opinion.