DSpark (Q8_0, 1.27 GiB) replaces z-lab DFlash2 (1.92 GiB): same 5-layer block-diffusion shape, Markov head instead of the candidate selector, and block_size 7, so the draft depth drops 7 -> 6 (llama.cpp asserts n_max <= block_size - 1). The serve script's dspark branch never passed --spec-draft-model (only the dflash branch did), so dspark was not deployable as written; the model file gate now covers both types. Download script, env and the unit seam track the new file and its exact byte count.
79 lines
3.0 KiB
Bash
Executable File
79 lines
3.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Download the frank-medium payload for Dankserver (2x Radeon AI PRO R9700):
|
|
# the target GGUF and the DSpark draft model, into /home/dank/models.
|
|
#
|
|
# bash scripts/download-frank-medium-gguf.sh
|
|
# bash scripts/download-frank-medium-gguf.sh --verify-only
|
|
#
|
|
# Both repositories are public (anonymous download; no token needed). If a
|
|
# token exists at ~/.cache/huggingface/token it is used, which keeps a 31 GB
|
|
# transfer clear of the anonymous rate limit. The script is resumable
|
|
# (curl -C -) and checks every artifact's exact byte count afterwards, so a
|
|
# truncated file fails here instead of load-crashing the server.
|
|
#
|
|
# WHY THESE TWO FILES:
|
|
# * Target: ajgazin/Swift-Qwen3.8-27B-Uncensored-Dynamic-MTP-GGUF at
|
|
# UD-Q8_K_XL -- Unsloth Dynamic 3.0 quant (per-tensor types from Unsloth's
|
|
# own quant of the same size, on Unsloth's importance matrix). The file
|
|
# carries the model's MTP layer (`blk.64.nextn.*`), so llama.cpp can also
|
|
# draft from the model itself with no second copy in VRAM.
|
|
# * Draft: magnitudedev/Qwen3.8-27B-DSpark-GGUF at Q8_0 -- the
|
|
# block-diffusion drafter with the Markov head (5 layers, hidden 5120,
|
|
# block_size 7). Q8_0 is 1.27 GiB against BF16's ~2.5 GiB and the
|
|
# drafter's job is throughput, not output quality (lossless verification).
|
|
set -euo pipefail
|
|
|
|
MODEL_REPO="ajgazin/Swift-Qwen3.8-27B-Uncensored-Dynamic-MTP-GGUF"
|
|
MODEL_DIR="/home/dank/models/Swift-Qwen3.8-27B-Uncensored-Dynamic-MTP-GGUF"
|
|
MODEL_FILE="Swift-Qwen3.8-27B-Uncensored-Dynamic-MTP-UD-Q8_K_XL.gguf"
|
|
MODEL_SIZE=31457990112
|
|
|
|
DRAFT_REPO="magnitudedev/Qwen3.8-27B-DSpark-GGUF"
|
|
DRAFT_DIR="/home/dank/models/Qwen3.8-27B-DSpark-GGUF"
|
|
DRAFT_FILE="Qwen3.8-27B-DSpark-Q8_0.gguf"
|
|
DRAFT_SIZE=1359284737
|
|
|
|
mode="download"
|
|
[[ "${1:-}" == "--verify-only" ]] && mode="verify"
|
|
|
|
token=""
|
|
auth=()
|
|
if [[ -r "$HOME/.cache/huggingface/token" ]]; then
|
|
token="$(cat "$HOME/.cache/huggingface/token")"
|
|
auth=(-H "Authorization: Bearer $token")
|
|
else
|
|
echo "no HF token at ~/.cache/huggingface/token; downloading anonymously"
|
|
fi
|
|
|
|
dl() { # dl <repo> <dir> <file>
|
|
mkdir -p "$2"
|
|
echo " fetching $3"
|
|
curl -fL -C - -o "$2/$3" --retry 10 --retry-delay 5 --retry-max-time 21600 \
|
|
"${auth[@]}" "https://huggingface.co/$1/resolve/main/$3"
|
|
}
|
|
|
|
if [[ "$mode" == "download" ]]; then
|
|
echo "target: $MODEL_REPO"
|
|
dl "$MODEL_REPO" "$MODEL_DIR" "$MODEL_FILE"
|
|
echo "draft: $DRAFT_REPO"
|
|
dl "$DRAFT_REPO" "$DRAFT_DIR" "$DRAFT_FILE"
|
|
fi
|
|
|
|
echo "verifying sizes"
|
|
ok=1
|
|
check() { # check <path> <expected>
|
|
local act
|
|
act="$(stat -c%s "$1" 2>/dev/null || echo 0)"
|
|
if [[ "$act" -eq "$2" ]]; then
|
|
echo " OK $1 ($act bytes)"
|
|
else
|
|
echo " BAD $1 ($act bytes, want $2)" >&2
|
|
ok=0
|
|
fi
|
|
}
|
|
check "$MODEL_DIR/$MODEL_FILE" "$MODEL_SIZE"
|
|
check "$DRAFT_DIR/$DRAFT_FILE" "$DRAFT_SIZE"
|
|
[[ -z "$token" ]] && echo "note: no token used; the byte counts above are the integrity check"
|
|
[[ "$ok" -eq 1 ]] || exit 1
|
|
echo "all artifacts present and sized correctly"
|