Public, ungated repo so no auth header is sent — a token on the curl command line is world-readable via /proc/<pid>/cmdline. Size and sha256 are the Hub LFS values (31457990272 / 9076f99a…), verified after fetch. Not wired into frank-large.env: the gufo load test has to pass first.
67 lines
2.6 KiB
Bash
Executable File
67 lines
2.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Download the Swift-1.5 frank-large candidate on Dankclaw:
|
|
# ajgazin/Swift-1.5-Qwen3.8-27B-Uncensored-Dynamic-MTP-GGUF
|
|
# Swift-1.5-Qwen3.8-27B-Uncensored-Dynamic-MTP-UD-Q8_K_XL.gguf
|
|
#
|
|
# bash scripts/download-frank-large-swift.sh
|
|
# bash scripts/download-frank-large-swift.sh --verify-only
|
|
#
|
|
# Integrity: the file is checked against its declared byte count and sha256
|
|
# (the LFS oid from the Hub, 2026-09-28). NO AUTH HEADER IS USED: the repo is
|
|
# public and ungated, and a token on the curl command line is world-readable
|
|
# via /proc/<pid>/cmdline. If this ever needs a token, put it in a mode-600
|
|
# file and pass it with `curl -K`.
|
|
#
|
|
# Layout after a successful run (MODEL_DIR):
|
|
# Swift-1.5-Qwen3.8-27B-Uncensored-Dynamic-MTP-UD-Q8_K_XL.gguf 31457990272
|
|
#
|
|
# This is the CANDIDATE payload, not the deployed one. frank-large still
|
|
# serves scripts/download-frank-large.sh's output; do not repoint
|
|
# frank-large.env at MODEL_DIR until the gufo load test passes.
|
|
set -euo pipefail
|
|
|
|
MODEL_DIR="/home/dank/models/Swift-1.5-Qwen3.8-27B-Uncensored-MTP-UD-Q8_K_XL"
|
|
REL="Swift-1.5-Qwen3.8-27B-Uncensored-Dynamic-MTP-UD-Q8_K_XL.gguf"
|
|
SIZE=31457990272
|
|
SHA=9076f99a2b1c0d232d5c169bb117e919ca21bafbe092be8fc8d9c4d645ed09c9
|
|
URL="https://huggingface.co/ajgazin/Swift-1.5-Qwen3.8-27B-Uncensored-Dynamic-MTP-GGUF/resolve/main/${REL}"
|
|
|
|
mode="download"
|
|
[[ "${1:-}" == "--verify-only" ]] && mode="verify"
|
|
|
|
if [[ "$mode" == "download" ]]; then
|
|
mkdir -p "$MODEL_DIR"
|
|
if [[ -s "$MODEL_DIR/$REL" ]]; then
|
|
echo "already present: $MODEL_DIR/$REL"
|
|
else
|
|
echo "fetching $REL (31457990272 bytes) — this is ~29 GiB"
|
|
# -f so an HTTP error is a failure, not a 153-byte "artifact".
|
|
# -C - so an interrupted run resumes instead of restarting.
|
|
curl -fL -C - --retry 5 --retry-delay 3 -o "$MODEL_DIR/$REL" "$URL"
|
|
fi
|
|
fi
|
|
|
|
echo "verifying $MODEL_DIR against declared size + sha256"
|
|
python3 - "$MODEL_DIR" "$REL" "$SIZE" "$SHA" <<'PY'
|
|
import hashlib, os, sys
|
|
model_dir, rel, size, sha = sys.argv[1], sys.argv[2], int(sys.argv[3]), sys.argv[4]
|
|
dest = os.path.join(model_dir, rel)
|
|
if not os.path.isfile(dest):
|
|
print(f" MISSING {rel}")
|
|
sys.exit(1)
|
|
actual = os.path.getsize(dest)
|
|
if actual != size:
|
|
print(f" SIZE MISMATCH {rel}: {actual} != {size}")
|
|
sys.exit(1)
|
|
h = hashlib.sha256()
|
|
with open(dest, "rb") as f:
|
|
for chunk in iter(lambda: f.read(1 << 24), b""):
|
|
h.update(chunk)
|
|
if h.hexdigest() != sha:
|
|
print(f" SHA256 MISMATCH {rel}: {h.hexdigest()}")
|
|
sys.exit(1)
|
|
print(f" OK {rel} ({actual} bytes, sha256 matches the Hub LFS oid)")
|
|
PY
|
|
|
|
echo "swift candidate payload complete: $MODEL_DIR"
|