Adding a model, more doc for pushing to the hub (#15690)
* doc for adding a model to the hub * run make style * resolved conversation * removed a line * removed ) * Update docs/source/add_new_model.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Update docs/source/add_new_model.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * make style Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
57882177be
commit
240cc6cbdc
@@ -793,9 +793,19 @@ You have now finished the coding part, congratulation! 🎉 You are Awesome!
|
|||||||
**12. Upload the models to the model hub**
|
**12. Upload the models to the model hub**
|
||||||
|
|
||||||
In this final part, you should convert and upload all checkpoints to the model hub and add a model card for each
|
In this final part, you should convert and upload all checkpoints to the model hub and add a model card for each
|
||||||
uploaded model checkpoint. You should work alongside the Hugging Face team here to decide on a fitting name for each
|
uploaded model checkpoint. You can get familiar with the hub functionalities by reading our [Model sharing and uploading Page](model_sharing). You should work alongside the Hugging Face team here to decide on a fitting name for each
|
||||||
checkpoint and to get the required access rights to be able to upload the model under the author's organization of
|
checkpoint and to get the required access rights to be able to upload the model under the author's organization of
|
||||||
*brand_new_bert*.
|
*brand_new_bert*. The `push_to_hub` method, present in all models in `transformers`, is a quick and efficient way to push your checkpoint to the hub. A little snippet is pasted below:
|
||||||
|
|
||||||
|
```python
|
||||||
|
brand_new_bert.push_to_hub(
|
||||||
|
repo_path_or_name="brand_new_bert",
|
||||||
|
# Uncomment the following line to push to an organization
|
||||||
|
# organization="<ORGANIZATION>",
|
||||||
|
commit_message="Add model",
|
||||||
|
use_temp_dir=True,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
It is worth spending some time to create fitting model cards for each checkpoint. The model cards should highlight the
|
It is worth spending some time to create fitting model cards for each checkpoint. The model cards should highlight the
|
||||||
specific characteristics of this particular checkpoint, *e.g.* On which dataset was the checkpoint
|
specific characteristics of this particular checkpoint, *e.g.* On which dataset was the checkpoint
|
||||||
|
|||||||
Reference in New Issue
Block a user