File size: 1,020 Bytes
87cc7f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Download pinned public checkpoints into a configurable Hugging Face cache."""
import argparse
import os
from pathlib import Path

from huggingface_hub import hf_hub_download

REPOS = (
    ("Qwen/Qwen3.5-0.8B", "2fc06364715b967f1860aea9cf38778875588b17"),
    ("RikiyaT/Qwen3.5-0.8B-weight-space-programming", "d1671a178705bcab7644806d23c535517f35723b"),
)

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--cache-dir", type=Path, default=Path(os.environ.get("HF_HUB_CACHE", "cache/huggingface")))
    args = parser.parse_args()
    args.cache_dir.mkdir(parents=True, exist_ok=True)
    for repo, revision in REPOS:
        path = hf_hub_download(
            repo_id=repo,
            filename="model.safetensors-00001-of-00001.safetensors",
            revision=revision,
            cache_dir=str(args.cache_dir),
            token=False,
        )
        print(f"downloaded {repo}@{revision} -> {path}", flush=True)

if __name__ == "__main__":
    main()