Download model repos from the Hugging Face Hub into the VFS.

Synopsis

hf download <repo> [files...] [--to <dir>] [--revision <rev>] [--force]

Description

Downloads files from a Hugging Face Hub repository (owner/name form) into the virtual filesystem, for use by local model runners such as speech engines or local-llm.

Options

--to <dir> Destination directory (default: /workspace/models/<repo>/).

--revision <rev> Git revision to fetch (default: main).

--force Re-download even if a matching file already exists at the destination.

Examples

$ hf download onnx-community/whisper-tiny

Download every file in the whisper-tiny repo.

$ hf download Xenova/all-MiniLM-L6-v2 config.json tokenizer.json

Download specific files only.

$ hf download onnx-community/Kokoro-82M-v1.0-ONNX --to /workspace/models/onnx-community/Kokoro-82M-v1.0-ONNX

Download to an explicit directory.

Notes

With no [files...], the whole repo tree is downloaded. Existing files with a matching byte length are skipped unless --force is passed. Speech engines read weights via the preview service worker, expecting <localModelPath>/<repo>/.

See Also

local-llm, uv, npm