Skip to main content

Module hf

Module hf 

Source
Expand description

HuggingFace Hub integration for automatic model downloading.

Functions§

ensure_model_downloaded
Downloads all required model files from HuggingFace Hub. Returns the local directory path containing the downloaded files. Checks local cache first — returns instantly if model already downloaded.
hf_cache_dir
Return the HuggingFace hub cache directory if it exists.
looks_like_hf_repo
Returns true if the string looks like a HuggingFace repo ID (e.g., “Qwen/Qwen2.5-Coder-1.5B-Instruct”).