-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
GH-921: fine-tune FlairEmbeddings #922
Conversation
👍 |
1 similar comment
👍 |
For clarification -- what exactly does it mean to "task-train a wholly new language model"? Is this different from training a LM on this data from scratch? |
Hello @jasminesjlee yes this would be different since the training objective is different. A standard language model is trained to predict the next character given the previous characters. However, what we do here is wrap it into |
Ah, I understand. Thank you @alanakbik ! :) |
@alanakbik What branch should i be in to access these changes i am currently on
Thanks |
As this PR is merged it is available on |
@pommedeterresautee Thanks . |
Closes #921
This PR makes FlairEmbeddings task-trainable. This allows users to (a) fine-tune an existing language model on task data and (b) train a new model only on task data.
fine_tune
parameter in theFlairEmbeddings
constructor, like this:LanguageModel
to theFlairEmbeddings
constructor and thefine_tune
parameter, like this:Also closes AttributeError: 'WordEmbeddings' object has no attribute 'embeddings' #880 by fixing the embedding printout.
This PR also removes the
FlairEmbeddings
-specific disk-caching mechanism. In the future, a more general caching mechanism applicable to all embedding types should be added on a different level of logic, potentially as a feature in theModelTrainer
.