Hugging Face Hub
Official client for downloading model weights, with resumable transfers and selective file patterns.
GitHub stars
3,988
License
Apache-2.0
Install
pip
Latest release
Oct 8, 2026
Best for
Pulling exactly the files you need from a repository instead of cloning tens of gigabytes you will not use.
Model formats
- safetensors
- GGUF
Hardware behaviour
HF_HOME at a drive with room before your first large download.Not sure what your card can hold? Run the fit check — the entry point in our listings is the RTX 4060 8GB at 8.00 GB.
Setup
Install Hugging Face Hub
Copy-paste starting points. Always read the project's own instructions before running anything with elevated permissions.
Install
Hugging Face Hub
pip install -U huggingface_hub[cli]
Log in (for gated models)
Hugging Face Hub
huggingface-cli login
Download one quantization
Hugging Face Hub
huggingface-cli download TheBloke/Llama-2-7B-GGUF llama-2-7b.Q4_K_M.gguf --local-dir ./models
Move the cache
Hugging Face Hub
export HF_HOME=/mnt/big-disk/hf
Quick start
Getting the first model running
Most people waste bandwidth by cloning an entire repository when they need one file. huggingface-cli download REPO FILENAME fetches only what you name, resumes if the connection drops, and stores it in a shared cache.
Gated repositories — Llama and several others — require accepting the licence on the website and then huggingface-cli login with a token. Downloads fail with a 401 until both steps are done.
FAQ
Hugging Face Hub questions people actually ask
Short answers to the problems that come up most often.
How do I download a single GGUF instead of the whole repo?
huggingface-cli download REPO FILE.gguf --local-dir ./models. You can also use --include with a glob pattern to grab a matching set.Where are downloads cached, and how do I move them?
~/.cache/huggingface. Set HF_HOME to relocate the whole cache, which is worth doing before you fill a system drive.Why do I get a 401 or 403 on some models?
huggingface-cli login using an access token.Can downloads be resumed?
Alternatives
Compared with other download tool options
Same job, different tradeoffs.
Ollama
One-command local model runner with an OpenAI-compatible API and automatic GPU offload.
inference enginellama.cpp
The C/C++ engine that made CPU and mixed CPU/GPU inference practical, and the origin of the GGUF format.
inference servervLLM
High-throughput serving engine with PagedAttention and continuous batching, built for concurrent requests.
Next step
A runner is only half the decision. Check which models fit your GPU with the VRAM calculator, then follow a setup guide or pick a ready-made stack.