Sharing models with the community
Trained models can be easily shared with the community. This provides more visibility for your work. Hugging Face provides a very easy-to-use model-sharing mechanism:
- You can simply use the following
cli
tool to log in:Transformers-cli login
- After you’ve logged in using your own credentials, you can create a repository:
Transformers-cli repo create a-fancy-model-name
- You can put any model name for the
a-fancy-model-name
parameter, and then it is essential to make sure you havegit-lfs
:git lfs install
Git LFS is a Git extension used for handling large files. Hugging Face pretrained models are usually large files that require extra libraries such as LFS to be handled by Git.
- Then, you can clone the repository you have just created:
git clone https://huggingface.co/username/a-fancy-model-name
- Afterward, you can add and remove from the repository as you like, and then, just like Git usage, you have to run the following command:
git...