Skip to main content

Module cache

Module cache 

Source
Expand description

HuggingFace cache directory resolution, model family scanning, and disk usage.

hf_cache_dir() locates the local HF cache. list_cached_families() scans downloaded models and groups them by model_type. cache_summary() provides per-repo size totals, and cache_repo_usage() returns per-file disk usage for a single repo.

Structs§

CacheFileUsage
Per-file disk usage entry within a cached repository.
CachedModelSummary
Summary of a single cached model (local-only, no API calls).
RepoStatus
Cache status report for a repository.

Enums§

FileStatus
Status of a single file in the cache.

Functions§

cache_repo_usage
Returns per-file disk usage for a specific cached repository.
cache_summary
Scans the entire HF cache and returns a summary for each cached model.
hf_cache_dir
Returns the HuggingFace Hub cache directory.
list_cached_families
Scans the local HF cache for downloaded models and groups them by model_type.
read_ref
Reads the commit hash from a refs file, if it exists.
repo_status
Inspects the local cache for a repository and compares against the remote file list.