public static download(repository as String, revision as String = "main", cache as Path = null, offline as Boolean = false, token as String = "", verbose as Boolean = true) as HubSnapshot
Downloads or reuses a complete, pinned local snapshot. Files use a bounded 64 KiB transfer buffer. Interrupted .part files resume only after HTTP range validation. LFS SHA-256 is checked before publication; ordinary Git assets have their byte count checked over verified TLS. Complete cache hits check sizes, not all weight digests on every startup. Offline mode performs no network access and requires a completed snapshot.
| Parameter | Description |
|---|---|
repository | Hub identifier such as Qwen/Qwen3.5-9B. |
revision | Branch, tag or commit; main by default. |
cache | Cache root; defaults to ~/.cache/klyn/models/huggingface. |
offline | Use only an already-complete cached snapshot. |
token | Optional access token, never forwarded across hosts. |
verbose | Show byte progress during downloads. |
Complete snapshot with its resolved immutable revision.
snapshot = HubClient.download("Qwen/Qwen3.5-9B", offline=true)