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

How to load fine tuned model to huggingface? #1928

Closed
samarpan-rai opened this issue Oct 31, 2020 · 2 comments
Closed

How to load fine tuned model to huggingface? #1928

samarpan-rai opened this issue Oct 31, 2020 · 2 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@samarpan-rai
Copy link

samarpan-rai commented Oct 31, 2020

I've fine tuned a huggingface model using flair for a classification task. I have it saved in a directory and and among many files, it has final-model.pt. I want to load this model to huggingface. How can I do this?

@samarpan-rai samarpan-rai added the question Further information is requested label Oct 31, 2020
@stefan-it
Copy link
Member

stefan-it commented Nov 19, 2020

Hi @samarpan-rai ,

this is a very interesting question, because I'm now working on an integration of Hugging Face model hub with Flair.

For a sequence tagger model, an uploaded model (to HF model hub) can be used in Flair with this PR:

#1974

However, it is not yet supported for text classification models, but I could work on that next.

As Hugging Face is using git-lfs as storage, it will be awesome if you could upload your trained model under your desired namespace with a flair prefix, such as hf-user-name/flair-classification-dataset-name. That would be the repository name.

Your model should then be renamed to model.bin (because the .bin extension is already registered for lfs uploads).

Details about uploading a model with git-lfs are described here:

https://huggingface.co/transformers/model_sharing.html

After uploading the model, just ping me here on GitHub, then I'll do the Flair integration of the model loading 🤗

@stale
Copy link

stale bot commented Mar 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Mar 19, 2021
@stale stale bot closed this as completed Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants