#!/usr/bin/env bash # Fetch the refusal-direction adapter that frank-zealot applies at load: # AtomicChat/Ternary-Bonsai-2-9B-Uncensored-LoRA-GGUF — a **3.2 MB rank-1 LoRA** # for prism-ml/Ternary-Bonsai-2-9B, not a checkpoint. Public repo: no auth # header, and never a token on the command line (a Bearer token is # world-readable in /proc//cmdline). # # IT IS AN EDIT INSIDE THE COMPUTE GRAPH, NOT A SECOND MODEL. The card: B = -r # (the refusal direction, row 23 of its own probe matrix), A = P^T(s * # H(r^T W_fold)) built from the base pack's folded input basis, applied at every # transformer layer (`target_layers = all`, `sites = 64`), with the embedding # deliberately untouched because an embedding LoRA crashes this fork's graph. # `--lora-scaled :` is the flag pair: scale 1 is the card's # "held-out refusals 0 %" point, scale 0 is the plain model again. # # THE RUNTIME IS A GATE, NOT A PREFERENCE. The card verified the adapter on # `prism-b10777-e3de715` — the exact build frank-zealot runs — and says older # forks (e.g. `prism-b10709`) refuse these packs with `unsupported # prism.hadamard.version: 2`. The fork is already pinned for the payload's # custom tensor type 142; this adapter adds a second reason it cannot move. # # PROVENANCE ASYMMETRY, STATED HONESTLY. The GGUF's own metadata names the pack # the direction was fitted against: # prism.abliterate.base_gguf = Ternary-Bonsai-2-9B-PTQ1_0.gguf # prism.abliterate.base_sha256 = 3561df7ac7d26a71ffa991ac2db740b10841c3a350aa2676ccd3ff5d428b4e8b # frank-zealot serves the PQ2_0 + MTP + Q8_0-embedding packing (its sha256 is # c79fcdfa…, see download-frank-zealot-bonsai9.sh), which is NOT that file and is # not on this host. The adapter still applies — same tensor names, and the # metadata is provenance rather than a checksum gate — but its strength was # calibrated on a sibling quantization. What proves the effect here is the # behaviour of the endpoint (a refusal probe before and after the swap), not the # metadata and not the card's table, which was measured on PTQ1_0. # # Fresh downloads, no resume; -f/--fail-with-body so an HTTP error is not a # success, then byte count and sha256 (this repo is NOT LFS — the file is a # plain git object, so the sha below is the content hash of the Hub's bytes as # fetched, not an LFS oid). Idempotent: a complete file is skipped. # # Usage: # scripts/download-frank-zealot-uncensored-lora.sh [DEST_DIR] [--verify-only] set -euo pipefail DEST="" VERIFY_ONLY=0 for arg in "$@"; do case "$arg" in --verify-only) VERIFY_ONLY=1 ;; *) DEST="$arg" ;; esac done DEST="${DEST:-/home/dank/models/Bonsai2-9B-MTP}" REPO="AtomicChat/Ternary-Bonsai-2-9B-Uncensored-LoRA-GGUF" # name | bytes | sha256 of the Hub's bytes FILES=( "Ternary-Bonsai-2-9B-Uncensored-LoRA.gguf|3155424|861b9c099fb5cd81438ba85bad30590847c777b1e18112586be7f4f9ae5fb07b" ) mkdir -p "$DEST" status=0 for entry in "${FILES[@]}"; do IFS='|' read -r name size sha <<<"$entry" url="https://huggingface.co/${REPO}/resolve/main/${name}" f="$DEST/$name" have=0 if [[ -f "$f" ]] && [[ "$(stat -c%s "$f")" == "$size" ]]; then if sha256sum -c --quiet <(printf '%s %s\n' "$sha" "$f"); then have=1 fi fi if (( have )); then echo "OK $name" continue fi if (( VERIFY_ONLY )); then echo "MISSING $name" status=1 continue fi echo "FETCHING $name (from $REPO)" tmp="$f.part" curl -fsSL --fail-with-body -o "$tmp" "$url" mv "$tmp" "$f" if [[ "$(stat -c%s "$f")" != "$size" ]]; then echo "SIZE FAIL $name ($(stat -c%s "$f") != $size)" status=1 continue fi if ! sha256sum -c --quiet <(printf '%s %s\n' "$sha" "$f"); then echo "SHA FAIL $name" status=1 continue fi echo "VERIFIED $name" done if (( status == 0 )); then echo "DOWNLOAD_DONE $DEST" else echo "DOWNLOAD_FAILED $DEST" >&2 fi exit "$status"