Huggingface CLI download
Huggingface CLI
Download an entire repository
https://huggingface.co/docs/huggingface_hub/main/en/guides/cli#download-a-single-file
Huggingface CLI download xxx/xxx --local-dir .
Huggingface hub
https://huggingface.co/docs/huggingface_hub/guides/download
from huggingface_hub import snapshot_download
snapshot_download(repo_id="gpt2", allow_patterns=["*.md", "*.json"], ignore_patterns="vocab.json")