inception-project / inception-external-recommender

Get annotation suggestions for the INCEpTION text annotation platform from spaCy, Sentence BERT, scikit-learn and more. Runs as a web-service compatible with the external recommender API of INCEpTION.
Apache License 2.0
40 stars 17 forks source link

Automatically provision models when accessing URL first time #27

Open jcklie opened 3 years ago

jcklie commented 3 years ago

It would be cool to add a function to ariadne so that you can just do something like this:

http://localhost:5000/ariadne/flair/sequencetagger/<modelname>

and then it just fetches the right model and that's it

david-waterworth commented 3 years ago

That would work quite nicely with the huggingface transformers library.

modelname = 'bert-base-cased' model = AutoModel.from_pretrained(modelname)

jcklie commented 3 years ago

We already use adapter for your transformer needs. I am currently working on v2 of this project, so I do not want to implement this and then archive the project.

david-waterworth commented 3 years ago

No problem, what's adapter? Is that something I can use now to implement external recommenders or is it a work in progress?

jcklie commented 3 years ago

Adapters are a way to efficiently finetune transformers. You do not fine tune the whole thing, but insert a small layer and finetune that.

https://adapterhub.ml/ https://github.com/inception-project/inception-external-recommender/blob/master/ariadne/contrib/adapters.py

david-waterworth commented 3 years ago

Thanks!