[[autodoc]] huggingfacehub.hfhubdownload
Downloading files
Download a single file
hf_hub_download
[[autodoc]] huggingface_hub.hf_hub_download
hf_hub_url
[[autodoc]] huggingface_hub.hf_hub_url
Download a snapshot of the repo
[[autodoc]] huggingface_hub.snapshot_download
Read the cached repo tree
[[autodoc]] huggingface_hub.get_cached_repo_tree
Resolve a revision
Resolve a branch/tag name to a commit hash once, then pass the result around to pin every download to the same commit. See HfApi.resolve_revision and the cache-system guide.
ResolvedRevision
[[autodoc]] huggingface_hub.ResolvedRevision
Get metadata about a file
get_hf_file_metadata
[[autodoc]] huggingface_hub.get_hf_file_metadata
HfFileMetadata
[[autodoc]] huggingface_hub.HfFileMetadata
Caching
The methods displayed above are designed to work with a caching system that prevents re-downloading files. The caching system was updated in v0.8.0 to become the central cache-system shared across libraries that depend on the Hub.
Read the cache-system guide for a detailed presentation of caching at HF.
Source and license
Source: Hub Python Library documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.