</Tip>

## Repository features

Each repository on the Model Hub behaves like a typical GitHub repository. Our repositories offer versioning, commit history, and the ability to visualize differences.

The Model Hub's built-in versioning is based on git and [git-lfs](https://git-lfs.github.com/). In other words, you can treat one model as one repository, enabling greater access control and scalability. Version control allows *revisions*, a method for pinning a specific version of a model with a commit hash, tag or branch.

As a result, you can load a specific model version with the `revision` parameter:

```py
>>> model = AutoModel.from_pretrained(
...     "julien-c/EsperBERTo-small", revision="v2.0.1"  # tag name, or branch name, or commit hash
... )
```

Files are also easily edited in a repository, and you can view the commit history as well as the difference:

![vis_diff](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/vis_diff.png)

## Setup

Before sharing a model to the Hub, you will need your Hugging Face credentials. If you have access to a terminal, run the following command in the virtual environment where 🤗 Transformers is installed. This will store your access token in your Hugging Face cache folder (`~/.cache/` by default):

```bash
huggingface-cli login
```

If you are using a notebook like Jupyter or Colaboratory, make sure you have the [`huggingface_hub`](https://huggingface.co/docs/hub/adding-a-library) library installed. This library allows you to programmatically interact with the Hub.

```bash
pip install huggingface_hub
```

Then use `notebook_login` to sign-in to the Hub, and follow the link [here](https://huggingface.co/settings/token) to generate a token to login with:

```py
>>> from huggingface_hub import notebook_login

>>> notebook_login()
```

## Convert a model for all frameworks
The context provides a clear and direct answer to the question. It specifies that to log in to the Hugging Face Hub from a terminal, you should use the command `huggingface-cli login`. This information is explicitly stated in the "Setup" section of the context, making the question unambiguously answerable.


This question is quite useful for machine learning developers who are working with the Hugging Face ecosystem, as logging into the Hugging Face Hub is a common task when managing models and datasets. Understanding how to perform this action from the terminal is essential for efficient workflow management, especially for those who prefer or require command-line operations. It directly relates to practical usage and integration of Hugging Face tools in development environments.


The question "What command is used to log in to the Hugging Face Hub from a terminal?" is context-independent because it is clear and specific. It asks for a command related to a well-known platform (Hugging Face Hub) and specifies the environment (terminal) in which the command is used. An operator with access to documentation or knowledge of the Hugging Face platform would understand what is being asked without needing additional context.

