fix(qwen38): the calibration tap runs on latest radiance, not the production pin #87

Merged
dank merged 2 commits from fix/quant-pipeline-hardening into main 2026-10-30 15:30:21 -07:00
3 changed files with 31 additions and 14 deletions
Showing only changes of commit 3e32cb9cd1 - Show all commits

No files matched your search

+6 -1
View File
@@ -47,7 +47,12 @@
set -u -o pipefail set -u -o pipefail
SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
IMAGE=${IMAGE:-stilldeadcode/radiance@sha256:d590e300234bf6d2f942a0b8d456d183153fd808f28820e6c2fa69c9389178ed} # THE TOOLCHAIN PIN. `:latest` on 2026-10-30 is v1.14.0 (revision 4a61d7296bc5),
# the same image the tap producer boots: a tap must be converted by the line that
# is current, and rad-convert's `gptq:calib=<dir>` input contract is version-stable
# (RADGRAM2 + gram.r<rank>.<stem>.bin), so nothing else about the recipe moves with
# it. Production stays on its own pin — this is the campaign's toolchain.
IMAGE=${IMAGE:-stilldeadcode/radiance@sha256:69add58f7de1ed2bca2b1e20a4cc75717557df3f73569a178eca5aafe8c44093}
CKPT=${CKPT:-/home/dank/models/Qwen3.8-Flash-Next} CKPT=${CKPT:-/home/dank/models/Qwen3.8-Flash-Next}
CAMPAIGN=${CAMPAIGN:-/home/dank/campaign/qwen38-w5nl64} CAMPAIGN=${CAMPAIGN:-/home/dank/campaign/qwen38-w5nl64}
RECIPE=${RECIPE:-$SELF/recipes/qwen4exp-qwen38-w5nl64-bf16trunk.recipe} RECIPE=${RECIPE:-$SELF/recipes/qwen4exp-qwen38-w5nl64-bf16trunk.recipe}
+20 -11
View File
@@ -25,13 +25,17 @@
# through the ro /models mount); OUT lands on a writable # through the ro /models mount); OUT lands on a writable
# mount because --kld-out F also writes F.rows beside it. # mount because --kld-out F also writes F.rows beside it.
# calib serve on :7770 with the calibration tap open # calib serve on :7770 with the calibration tap open
# (RADIANCE_CALIB_DIR + RADIANCE_CALIB_TOKENS=12000000). A # (RADIANCE_CALIB_DIR + RADIANCE_CALIB_TOKENS=1500000). A
# separate driver — scripts/calib-push.py --port 7770 # separate driver — scripts/calib-push.py --port 7770
# --container qwen38-bf16 --corpus # --container qwen38-bf16 --corpus
# /home/dank/corpora/out/calib.jsonl — pushes the corpus; at # /home/dank/corpora/out/calib.jsonl — pushes the corpus; at
# 12M pooled positions the engine writes the Grams and the # the floor the engine writes the Grams and the tap switches
# tap switches itself off (calib-push prints TAP_DONE). Stop # itself off (calib-push prints TAP_DONE). Stop this script
# this script after that; the trap brings frank-archon back. # after that; the trap brings frank-archon back. The vendor's
# own measurement is the floor's warrant — "a pooled Gram
# from 10 M tokens beat one from 1 M by under 1 %" — and at
# this rig's measured push rate a 1.5 M floor is hours, not
# the 29 h a 6 M floor cost. One seal writes ~40 GiB.
# #
# Shape: the vendor's bf16 calibration lines — expert_tiered placement with the # Shape: the vendor's bf16 calibration lines — expert_tiered placement with the
# weights disk tier, deterministic (the resident set pinned to the loader's plan, # weights disk tier, deterministic (the resident set pinned to the loader's plan,
@@ -113,12 +117,17 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source "$SCRIPT_DIR/frank-archon.env" source "$SCRIPT_DIR/frank-archon.env"
IMAGE="${FRANK_ARCHON_IMAGE:?FRANK_ARCHON_IMAGE must name the radiance image}" IMAGE="${FRANK_ARCHON_IMAGE:?FRANK_ARCHON_IMAGE must name the radiance image}"
# THE CALIBRATION PIN. RADIANCE_CALIB_DIR/TOKENS arms the expert tap on the 1.2.x # THE CALIBRATION PIN: the LATEST radiance, pinned by digest because a tag is a
# line only. 1.8.1 still carries every plugin string and the seal message, and a # moving target and a tap must name the producer that wrote it. `:latest` on
# 17-hour run on it wrote ZERO bytes into the tap dir while /health, /stats and # 2026-10-30 resolves to v1.14.0 (revision 4a61d7296bc5), and on that image a
# the push all looked healthy (measured 2026-10-30) — so calib boots THIS digest # calib boot prints the arming line — "recorded passes: off, the program
# and any other image must be named deliberately with --image. # accumulates calibration Grams (gram_accum)" — where the production pin
CALIB_IMAGE="${Q38_CALIB_IMAGE:-stilldeadcode/radiance@sha256:665775ed1d90de6dbb25558e07fc60d20328f1346f96f3c6e00845eb763f01fa}" # (1.8.1) prints nothing of the kind: a 17-hour run on 1.8.1 wrote ZERO bytes
# into the tap dir while /health, /stats and the push all looked healthy
# (measured 2026-10-30). The tap code is identical in both trees' sources, so
# the shipped 1.8.1 build is what drops it; do not spend another window on it.
# Any other image must be named deliberately with --image.
CALIB_IMAGE="${Q38_CALIB_IMAGE:-stilldeadcode/radiance@sha256:69add58f7de1ed2bca2b1e20a4cc75717557df3f73569a178eca5aafe8c44093}"
IMAGE_EXPLICIT=0 IMAGE_EXPLICIT=0
MODE="" MODE=""
@@ -348,7 +357,7 @@ case "$MODE" in
} }
MOUNTS+=(-v "$CALIB_DIR:/data/calib") MOUNTS+=(-v "$CALIB_DIR:/data/calib")
TAPENV=(-e RADIANCE_CALIB_DIR=/data/calib TAPENV=(-e RADIANCE_CALIB_DIR=/data/calib
-e "RADIANCE_CALIB_TOKENS=${FRANK_QWEN38_CALIB_TOKENS:-12000000}") -e "RADIANCE_CALIB_TOKENS=${FRANK_QWEN38_CALIB_TOKENS:-1500000}")
# The tap's own authorization. A pusher must see this marker before it sends # The tap's own authorization. A pusher must see this marker before it sends
# a prompt (calib-push.py --tap-marker), it names the container so a push # a prompt (calib-push.py --tap-marker), it names the container so a push
# aimed anywhere else refuses, and a boot that fails removes it again below. # aimed anywhere else refuses, and a boot that fails removes it again below.
+5 -2
View File
@@ -157,12 +157,15 @@ flag_value() {
[[ "$output" != *"--vram-kv-mib"* ]] [[ "$output" != *"--vram-kv-mib"* ]]
} }
@test "the calib dry run opens the tap at 12M tokens and serves on 7770" { @test "the calib dry run opens the tap at the 1.5M floor, on the latest pin, and serves on 7770" {
run bash "$RUNNER" calib --dry-run run bash "$RUNNER" calib --dry-run
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
flat="$(oneline)" flat="$(oneline)"
[[ "$flat" == *"-e RADIANCE_CALIB_TOKENS=12000000"* ]] [[ "$flat" == *"-e RADIANCE_CALIB_TOKENS=1500000"* ]]
[[ "$flat" == *"-e RADIANCE_CALIB_DIR=/data/calib"* ]] [[ "$flat" == *"-e RADIANCE_CALIB_DIR=/data/calib"* ]]
# the tap producer is the campaign's own pin (latest radiance), not production's
[[ "$flat" == *"radiance@sha256:69add58f"* ]]
[[ "$flat" != *"radiance@sha256:d590e300"* ]]
[[ "$flat" == *"--port 7770"* ]] [[ "$flat" == *"--port 7770"* ]]
[[ "$flat" == *":/data/calib "* ]] [[ "$flat" == *":/data/calib "* ]]
# calib serves; it does not record # calib serves; it does not record