-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Autoupload models to huggingface hub after training #2416
Comments
Using huggingface_hub lib we can create a repo and upload them model files. To add a model card, we simply have to upload a README.md according to this structure. |
Sentencetranformers lib also offers this kind of functionality. Maybe we can get some inspiration from there, too. |
Additionally, it might make sense to make this available for distilled models too. Something that would allow you to do:
In this case, a helper function might make more sense though as there won't be a .train() to provide the HF options to. |
I got a first draft of this to work with FarmReader. The model gets converted to the transformers model format so it can be reused later by loading it back from HF too. Created a draft PR 😊 |
Is your feature request related to a problem? Please describe.
When training with FARMReader finishes, there should be an option to upload it automatically to HF hub.
Describe the solution you'd like
Add option and template to auto upload trained / fine-tuned model to HF.
Describe alternatives you've considered
Implement helper function to upload model to HF manually. Maybe we go for that if the selection of the model snapshot involves human interaction.
Tasks:
hf_token
,hf_repo
,hf_branch
,hf_model_card
params toFARMReader.train()
,DensePassageRetriever.train()
andTableTextRetriever.train()
The text was updated successfully, but these errors were encountered: