#
Uploading models

To upload models to the Hub, you’ll need to create an account at Hugging Face. Models on the Hub are Git-based repositories, which give you versioning, branches, discoverability and sharing features, integration with over a dozen libraries, and more! You have control over what you want to upload to your repository, which could include checkpoints, configs, and any other files.

You can link repositories with an individual, such as osanseviero/fashion_brands_patterns, or with an organization, such as facebook/bart-large-xsum. Organizations can collect models related to a company, community, or library! If you choose an organization, the model will be featured on the organization’s page, and every member of the organization will have the ability to contribute to the repository. You can create a new organization here.

There are several ways to upload models to the Hub, described below. We suggest adding a Model Card to your repo to document your model.

##
Using the web interface

To create a brand new model repository, visit huggingface.co/new. Then follow these steps:

1. In the “Files and versions” tab, select “Add File” and specify “Upload File”:

2. From there, select a file from your computer to upload and leave a helpful commit message to know what you are uploading:

3. Afterwards, click Commit changes to upload your model to the Hub!

4. Inspect files and history

You can check your repository with all the recently added files!

The UI allows you to explore the model files and commits and to see the diff introduced by each commit:

5. Add metadata

You can add metadata to your model card. You can specify:

- the type of task this model is for, enabling widgets and the Inference API.
- the used library (`transformers`, `spaCy`, etc.)
- the language
- the dataset
- metrics
- license
- a lot more!

Read more about model tags here.

6. Add TensorBoard traces

Any repository that contains TensorBoard traces (filenames that contain `tfevents`) is categorized with the `TensorBoard` tag. As a convention, we suggest that you save traces under the `runs/` subfolder. The “Training metrics” tab then makes it easy to review charts of the logged variables, like the loss or the accuracy.

Models trained with 🤗 Transformers will generate TensorBoard traces by default if `tensorboard` is installed.

##
Using Git

Since model repos are just Git repositories, you can use Git to push your model files to the Hub. Follow the guide on Getting Started with Repositories to learn about using the `git` CLI to commit and push your models.

##
Using the `huggingface_hub` client library

The rich feature set in the `huggingface_hub` library allows you to manage repositories, including creating repos and uploading models to the Model Hub. Visit the client library’s documentation to learn more.