Hugging Face · Cache and environment

Download a repository from Python

Download a full repository snapshot and get its local path.

from huggingface_hub import snapshot_download

path = snapshot_download("Qwen/Qwen2.5-0.5B-Instruct")

Official Hugging Face documentation

More cache and environment commands

All cache and environment commands · Hugging Face cheatsheet

Was this page helpful?