File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -154,9 +154,27 @@ jobs:
154154 python -m pip install huggingface_hub mlx mlx-lm
155155
156156 - name : Download test model from HuggingFace
157+ env :
158+ HF_TOKEN : ${{ secrets.HF_TOKEN }}
157159 run : |
158160 mkdir -p models
159- hf download mlx-community/Qwen1.5-0.5B-Chat-4bit --local-dir models/Qwen1.5-0.5B-Chat-4bit --local-dir-use-symlinks False
161+ python - <<'PY'
162+ import os
163+ from pathlib import Path
164+
165+ from huggingface_hub import snapshot_download
166+
167+ target_dir = Path("models/Qwen1.5-0.5B-Chat-4bit")
168+ target_dir.mkdir(parents=True, exist_ok=True)
169+
170+ snapshot_download(
171+ repo_id="mlx-community/Qwen1.5-0.5B-Chat-4bit",
172+ local_dir=str(target_dir),
173+ local_dir_use_symlinks=False,
174+ token=os.environ.get("HF_TOKEN") or None,
175+ resume_download=True,
176+ )
177+ PY
160178 echo "Model files:"
161179 ls -la models/Qwen1.5-0.5B-Chat-4bit/
162180
You can’t perform that action at this time.
0 commit comments