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