#!/usr/bin/env bash # download-frank-large-halogen.sh — fetch frank-large's halogen payload: # the qwen3.8-27b .hgn checkpoint and the export tokenizer, from the # PUBLIC peonist-ai/halogen-qwen3.8-27b repo (no token — and per the fleet # secret law, none would ever touch argv). # # The fetch law, same as every sibling script: curl -f (an access error # must not become a "successful" 153-byte artifact), exact byte count from # the model card, LFS sha256 verification, --verify-only to re-check an # existing payload without downloading. set -euo pipefail DEST="${FRANK_LARGE_MODEL_DIR:-$HOME/models/halogen-qwen3.8-27b}" BASE="https://huggingface.co/peonist-ai/halogen-qwen3.8-27b/resolve/main" FILES=(qwen3.8-27b-p1w4d-d2.hgn frank-large.tokenizer.gguf) # Byte sizes and sha256 (LFS oid) as published by the Hub on 2026-10-05 — # re-check with: curl -s "https://huggingface.co/api/models/peonist-ai/halogen-qwen3.8-27b/tree/main?recursive=true" SIZES=(35880329102 1293343) SHAS=(40874e7a5c27efcf1c83c44374db85726fa4086355b3c8aae1b363644d7e6234 4c1ab3a19932f7d16eefc2c7fa60715c91133fe99c6dce683a3a7f11d463e7e9) VERIFY_ONLY=0 [ "${1:-}" = "--verify-only" ] && VERIFY_ONLY=1 mkdir -p "$DEST" for i in "${!FILES[@]}"; do f="${FILES[$i]}"; want="${SIZES[$i]}"; sha="${SHAS[$i]}" path="$DEST/$f" if [ "$VERIFY_ONLY" -eq 0 ]; then echo "FETCH $f -> $path" # -C - resumes a partial file; -f keeps HTTP errors fatal. curl -fL --retry 5 -C - -o "$path" "$BASE/$f" fi [ -f "$path" ] || { echo "MISSING $path (run without --verify-only)" >&2; exit 1; } got="$(stat -c %s "$path")" [ "$got" = "$want" ] || { echo "SIZE $path: $got != $want" >&2; exit 1; } echo "OK $f ($got bytes)" done echo "byte counts match; verifying sha256 (one pass over 33.4 GiB)..." for i in "${!FILES[@]}"; do f="${FILES[$i]}"; sha="${SHAS[$i]}" got="$(sha256sum "$DEST/$f" | cut -d' ' -f1)" [ "$got" = "$sha" ] || { echo "SHA256 $f: $got != $sha" >&2; exit 1; } echo "OK $f sha256" done echo "DOWNLOAD_DONE $DEST"