#!/usr/bin/env bash # download-frank-archon-iq4r.sh — payload fetch/verify for the frank-archon # swap to the PUBLISHER's 4-bit-codebook container: # StillDeadcode/qwen3.8-next-flash-fp8-iq4r-moe — the official # Qwen/Qwen3.8-Flash-Next bf16 checkpoint rad-converted by the engine's own # author into ONE .rad: routed experts as 4-bit codes into a 16-level # non-uniform codebook (Walsh–Hadamard rotation, GPTQ + coordinate-descent, # 10M-token calibration), ten bf16-protected experts per layer, int8 trunk + # lm_head, fp8 HC mixtures, the PLE n-gram table at fp8 fixed scale, the MTP # head, and the bf16 vision tower. File: # qwen3.8-next-flash-fp8-iq4r-moe.rad — 121,969,901,568 B (113.6 GiB, # 116,322 MiB), card KL 0.0789 all-tokens / top-1 92.85 % vs bf16. # Repo is UNGATED — no token needed (never put one on the command line). # # bash scripts/download-frank-archon-iq4r.sh --fetch resume/complete # bash scripts/download-frank-archon-iq4r.sh verify only # # Fetch uses the vendored scripts/hfget.sh (curl+jq only): per-file size # checks against the Hub listing, `-C -` resume, disk-fit gate. The side # files (LICENSE, README, the w4nl recipe) stay in the staging dir as # provenance; the serve gate mounts ONLY /home/dank/models/rad, so the # verified .rad alone moves into it. # # Verify (default) is the AGENTS.md law in two parts: the file lands at the # final path with the Hub's EXACT byte count, and its sha256 equals the # Hub's LFS oid. A truncated transfer is a guaranteed long-timeout boot # without this gate. set -euo pipefail REPO="StillDeadcode/qwen3.8-next-flash-fp8-iq4r-moe" RAD_NAME="qwen3.8-next-flash-fp8-iq4r-moe.rad" STAGE="/home/dank/models/StillDeadcode/qwen3.8-next-flash-fp8-iq4r-moe" DEST="/home/dank/models/rad/$RAD_NAME" SIZE=121969901568 SHA256="0af5e96244e80c21ac8edca1719dae49b8a201b94a2f3994c3e24026ceaa4d20" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" mode="verify" [[ "${1:-}" == "--fetch" ]] && mode="fetch" if [[ "$mode" == "fetch" ]]; then # HFGET_JOBS=4 is hfget's default (a few streams saturate the link). bash "$SCRIPT_DIR/hfget.sh" "$REPO" "$STAGE" main staged="$STAGE/$RAD_NAME" if [[ ! -f "$staged" ]]; then echo "FETCH FAILED: $staged absent after hfget" >&2 exit 1 fi got=$(stat -c %s "$staged") if [[ "$got" != "$SIZE" ]]; then echo "FETCH FAILED: staged .rad is $got B, want $SIZE B" >&2 exit 1 fi echo "staged .rad byte-exact ($SIZE B); hashing (one full read, minutes)" got_sha=$(sha256sum "$staged" | cut -d' ' -f1) if [[ "$got_sha" != "$SHA256" ]]; then echo "FETCH FAILED: sha256 $got_sha, want $SHA256 — DELETE the staged" \ "file before re-fetching (curl -C - cannot repair a corrupt body)" >&2 exit 1 fi mkdir -p "$(dirname "$DEST")" mv "$staged" "$DEST" echo "payload placed: $DEST" fi echo "verifying deployed payload: $DEST" if [[ ! -f "$DEST" ]]; then echo " BAD payload absent: $DEST" >&2 exit 1 fi got=$(stat -c %s "$DEST") if [[ "$got" != "$SIZE" ]]; then echo " BAD payload is $got B, want $SIZE B" >&2 exit 1 fi echo "byte-exact ($SIZE B); hashing (one full read, minutes)" got_sha=$(sha256sum "$DEST" | cut -d' ' -f1) if [[ "$got_sha" != "$SHA256" ]]; then echo " BAD sha256 $got_sha, want $SHA256" >&2 exit 1 fi echo "payload verified: $RAD_NAME, size and sha256 match the Hub LFS oid"