Expand description
Hugging Face Hub download helper.
This used to shell out to the hf CLI, which meant a Rust engine
could not fetch its own weights without a Python install and
pip install huggingface_hub. The transport is native now: see
[crate::hub], which resolves IPv4 first, reads HF_TOKEN, honours
HF_ENDPOINT, and asks for a byte range so an interrupted download
resumes rather than starting from zero.
hf is still used when it is on PATH and the native path is not
compiled in, so an existing setup keeps working.
Functionsยง
- looks_
like_ hf_ repo - True when
pathlooks like a Hub repo id rather than a local file. - pull_
hf_ gguf - Download
repoand return a local.ggufpath. - resolve_
model_ path - If
modelis a Hub repo id, download and return the local GGUF path.