Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiTagger for Multiple Sequence Tagging Models #1791

Closed
alanakbik opened this issue Aug 4, 2020 · 2 comments
Closed

MultiTagger for Multiple Sequence Tagging Models #1791

alanakbik opened this issue Aug 4, 2020 · 2 comments

Comments

@alanakbik
Copy link
Collaborator

With the upcoming biomedical Flair release ("hunflair") comes a new object called MultiTagger with which multiple different SequenceTagger can be chained.

This tasks monitors the optimization of this model, namely:

  • If two models use the same static embedding, only one of them should be kept in memory
  • If two models use the same static embedding, only one of them should be applied during prediction

The idea is to enable us to load several models at once, like this:

# load tagger for POS, chunking, NER and frame detection
tagger = MultiTagger.load(['pos', 'upos', 'chunk', 'ner', 'frame'])

# example sentence
sentence = Sentence("George Washington was born in Washington")

# predict
tagger.predict(sentence)
@alanakbik
Copy link
Collaborator Author

Added in #1790

@shenron9155
Copy link

I have a custom flair LM model and a few classifiers that use the same LM embdeddings. Is there an equivalent MultiClassifier? So that the embeddings are reused per inference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants