01# Before:
02# from huggingface_hub import hf_hub_download, snapshot_download, upload_folder
03
04from hippius_hub import hf_hub_download, snapshot_download, upload_folder, login
05
06# Authenticate once — token at https://console.hippius.com/dashboard/settings
07login(token="hf_xxx")
08
09# Pull one file
10path = hf_hub_download(
11 repo_id="myorg/qwen-7b",
12 filename="model.safetensors",
13 revision="v1",
14)
15
16# Pull a whole revision in parallel
17local_dir = snapshot_download(
18 repo_id="myorg/qwen-7b",
19 revision="v1",
20 allow_patterns=["*.safetensors", "*.json"],
21 max_workers=8,
22)
23
24# Push the same way you would to HF
25upload_folder(
26 folder_path="./checkpoints",
27 repo_id="myorg/qwen-7b",
28 revision="v1",
29)
30
31# transformers/diffusers natively load from the Hippius cache
32import hippius_hub as huggingface_hub # drop-in swap
33from transformers import AutoModel
34model = AutoModel.from_pretrained("myorg/qwen-7b")