download-model.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env bash
  2. # Download the Huihui Qwen3.8-27B AWQ W4A16 checkpoint (auto-round INT4, ~20 GB)
  3. # into the Hugging Face cache that vLLM reads (HF_HOME=/storage-models/vllm).
  4. #
  5. # Usage:
  6. # ./download-model.sh
  7. # HF_HOME=/some/other/cache ./download-model.sh
  8. #
  9. # Re-running is cheap: huggingface_hub resumes/verifies already-downloaded files.
  10. set -euo pipefail
  11. REPO="shawnw3i/Huihui-Qwen3.8-27B-abliterated-AWQ-MTP"
  12. export HF_HOME="${HF_HOME:-/storage-models/vllm}"
  13. SNAPSHOT_GLOB="$HF_HOME/hub/models--${REPO//\//--}/snapshots/*/config.json"
  14. if compgen -G "$SNAPSHOT_GLOB" >/dev/null; then
  15. echo "Already present in $HF_HOME/hub ($(du -sh "$HF_HOME/hub/models--${REPO//\//--}" | cut -f1))"
  16. echo "Nothing to do. (Delete that cache entry to force a re-download.)"
  17. exit 0
  18. fi
  19. if command -v hf >/dev/null 2>&1; then
  20. hf download "$REPO"
  21. elif command -v huggingface-cli >/dev/null 2>&1; then
  22. huggingface-cli download "$REPO"
  23. else
  24. echo "No Hugging Face CLI found. Install it first:" >&2
  25. echo " pip install -U 'huggingface_hub[cli]'" >&2
  26. exit 1
  27. fi
  28. echo
  29. du -sh "$HF_HOME/hub/models--${REPO//\//--}"
  30. echo "Done. Next: docker compose up -d (first start compiles kernels / captures CUDA graphs)"