Farm: Could I extract embeddings from the model which has been fine tuned ?

Created on 21 Jan 2020  路  1Comment  路  Source: deepset-ai/FARM

Question
Could I extract embeddings from the model which has been fine tuned ?

Additional context
Hello, I have fine tuned the original "pytorch_model.bin" using the script "doc_classification_multilabel.py". And it produced a new language model "language_model.bin" and many other files. So I'm wondering whether I can extract embeddings of sentences from this newly-formed language model "language_model.bin"? Thank you !

question

Most helpful comment

Hi @JiangYanting ,

Sure, please check out the example in examples/embedding_extraction.py. I just updated it to reflect the latest changes in the Inferencer.

You can now load a) fine-tuned models from a directory and b) any model in transformer format from their model hub .

Hope this helps.

>All comments

Hi @JiangYanting ,

Sure, please check out the example in examples/embedding_extraction.py. I just updated it to reflect the latest changes in the Inferencer.

You can now load a) fine-tuned models from a directory and b) any model in transformer format from their model hub .

Hope this helps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lady-vanessa picture lady-vanessa  路  4Comments

zolekode picture zolekode  路  4Comments

Chipandcharge picture Chipandcharge  路  5Comments

tholor picture tholor  路  5Comments

malteos picture malteos  路  6Comments