huggingface-cli
command-line interface for Hugging Face Hub
TLDR
Login to Hugging Face
$ huggingface-cli login
Download a model$ huggingface-cli download [model-name]
Download to specific directory$ huggingface-cli download [model-name] --cache-dir [path]
Download specific files$ huggingface-cli download [model-name] [config.json] [model.safetensors]
Upload a file$ huggingface-cli upload [repo-id] [file]
Logout$ huggingface-cli logout
SYNOPSIS
huggingface-cli command [options]
DESCRIPTION
huggingface-cli (also hf) is the command-line interface for Hugging Face Hub. Download models and datasets, manage repositories, and authenticate your machine. Part of the huggingfacehub Python package. Default cache location is ~/.cache/huggingface or HFHOME environment variable.
PARAMETERS
--token token
Use specific access token.--cache-dir path
Download destination directory.
SUBCOMMANDS
login
Authenticate with Hugging Face Hub.logout
Log out of Hugging Face Hub.download repo [files]
Download files from the Hub.upload repo files
Upload files to a repository.repo
Manage repositories.env
Display environment info.
SEE ALSO
pip(1), transformers-cli(1)
