Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/main/course/videos/push_to_hub_old.ipynb
Views: 2542
This notebook regroups the code sample of the video below, which is a part of the Hugging Face course.
Install the Transformers and Datasets libraries to run this notebook.
Push to hub from the Trainer directly
You will need an authentication token with your Hugging Face credentials to use the push_to_hub
method. Execute huggingface-cli login
in your terminal or by uncommenting the following cell:
The Trainer
has a new method to directly upload the model, tokenizer and model configuration in a repo on the Hub. It will even auto-generate a model card draft using the hyperparameters and evaluation results!
If you are using your own training loop, you can push the model and tokenizer separately (and you will have to write the model card yourself):