Skip to main content
Registry • 2 mins read

Pulling models & images

Pulling models & images

Public namespaces pull anonymously. Private namespaces need a login. See Push for the one-shot provisioning step that also writes the credentials hippius-hub uses on pull.


Pull a single file​

from hippius_hub import hf_hub_download

path = hf_hub_download(
repo_id="my-models/qwen-7b",
filename="config.json",
revision="v1",
)
print(path) # ~/.cache/hippius/hub/models--my-models--qwen-7b/snapshots/v1/config.json

Drop-in for hf_hub_download. The cache layout matches huggingface_hub. Point transformers.from_pretrained(..., cache_dir="~/.cache/hippius/hub") at that cache after a download, or pass the local folder from snapshot_download. import hippius_hub as huggingface_hub does not patch transformers.


Pull a whole repo​

from hippius_hub import snapshot_download

local_dir = snapshot_download(
repo_id="my-models/qwen-7b",
revision="v1",
allow_patterns=["*.safetensors", "*.json"],
ignore_patterns="optimizer*",
max_workers=8,
)

Drop-in for snapshot_download. For whole-repo pulls this is the recommended path: it parallelizes across files and lays bytes out in the HF cache shape. Then call from_pretrained with cache_dir="~/.cache/hippius/hub" (or pass local_dir).


Tag vs digest​

Tags (:v1, :main) are mutable: re-pushing to the same revision moves the tag onto a new manifest. Digests (@sha256:…) are immutable: the same bytes forever.

  • Pin to a digest for CI/CD, Kubernetes manifests, and anywhere reproducibility matters.
  • Use a tag for interactive development and the "give me the latest" case.

hippius-hub models show <repo> prints every tag and digest indexed for a repo.


Tuning parallel downloads​

The Rust downloader ships in the wheel, so there is no compile step.

Env varDefaultWhat it does
HIPPIUS_CHUNK_SIZE104857600 (100 MiB)Per-chunk size for the parallel Rust downloader. Smaller = more parallel requests, larger = fewer/bigger requests.
HIPPIUS_VERIFY_HASHon (true)Whole-file SHA256 check on plain downloads. Set to 0/false to skip. Chunked downloads always verify.
HIPPIUS_MAX_CONCURRENT16Parallel Range connections per file.
HIPPIUS_CONNECT_TIMEOUT30Connect timeout in seconds.
HIPPIUS_READ_TIMEOUT(client default)Read timeout in seconds.
HIPPIUS_SNAPSHOT_WORKERS8snapshot_download file-parallelism.
HIPPIUS_UPLOAD_WORKERS8Upload worker count.

For snapshot_download, max_workers=8 (the default) parallelizes across files. Bump it higher on fat connections.

If a download is slow, run hippius-hub diagnose <repo> <file> [--verbose] [--json] first. The hub repo also has docs/diagnosing-speed.md.

Python surface​

Besides hf_hub_download and snapshot_download: upload_file, upload_folder, create_repo, delete_repo, repo_info, model_info, list_repo_files, repo_exists, revision_exists, file_exists, login, and HippiusApi (subclass of HfApi). Every function accepts endpoint=. console.models_list(...) is the Python form of hippius-hub models list.


Where to next​

  • Push: upload your own models or container images.
  • CLI reference: every hippius-hub command, grouped by goal.