feat(frank-archon): raise the pinned host pool; the campaign inherits the step

frank-archon.env: HOST_POOL_MIB 49,152 -> 66,560 a rank (tp x 65 GiB against the
246 GiB the box has), and the TTM pair 162,000/204,800 -> 197,000/224,000 — the
floor the bats ledger formula computes at the new pool. The pool is the KV lever
under the budget resolver: every MiB pinned in host RAM lowers the expert floor on
the card one-for-one and the cache takes it.

scripts/run-qwen38-bf16.sh: the campaign's private FRANK_QWEN38_MNBT (1,024) is
gone — MNBT now comes from FRANK_ARCHON_MAX_BATCHED_TOKENS, production's 2,048 and
the widest step the quantised expert file tiers stream. That 1,024 was PR #80's
answer to a starved cache; the pool is the fix, a narrow step was the symptom's
disguise, and a per-mode literal measures a shape nothing serves.

tests: frank_archon_unit greps the new pool value; qwen38_reference's SHAPE fixture
carries it, and the two MNBT-override tests become the inheritance assertion (every
mode's argv quotes the value the env file owns) plus the calib assertions.

vault: the shape block moves to the new numbers and the Eras table gains the row for
the era this replaces. The 2026-10-20 boot-ledger line stays as the old era's record
until the new boot's ledger replaces it.
This commit is contained in:
Frank committed 2026-10-29 13:10:32 -07:00
1 parent a3ff55efd8
commit 255796b3dc
5 files changed
+52 -51

No files matched your search

+11 -15
View File
@@ -29,7 +29,7 @@ RUNNER="$REPO_ROOT/scripts/run-qwen38-bf16.sh"
# The reference shape, spelled exactly as run-qwen38-bf16.sh must pass it: this
# is the contract the recorded reference is measured at, so a silent edit here
# is a silent edit to every KLD number in the campaign.
SHAPE="--tp 2 --placement expert_tiered --weights-disk-tier --host-pool-mib 49152 --gpu-headroom-mib 96 --deterministic --num-speculative-tokens 0 --kv-cache-dtype fp8 --max-model-len 32768 --ngram-placement ram --override-chat-template /models/tpl.jinja"
SHAPE="--tp 2 --placement expert_tiered --weights-disk-tier --host-pool-mib 66560 --gpu-headroom-mib 96 --deterministic --num-speculative-tokens 0 --kv-cache-dtype fp8 --max-model-len 32768 --ngram-placement ram --override-chat-template /models/tpl.jinja"
# oneline — both dry runs print one shell-quoted argument a line; joining them
# lets an option and its value be asserted as the pair they are.
@@ -267,28 +267,24 @@ flag_value() {
[ "$status" -eq 0 ]
score_step="$(flag_value --max-num-batched-tokens <<< "$output")"
[ "$ref_step" = "$score_step" ]
# one knob moves both, so the operator can lower it at 2 a.m. without an edit
run env FRANK_QWEN38_MODELS="$M" FRANK_QWEN38_CAMPAIGN="$C" FRANK_QWEN38_MNBT=1024 \
bash "$RUNNER" kldref --dry-run
[ "$(flag_value --max-num-batched-tokens <<< "$output")" = "1024" ]
run env FRANK_QWEN38_MODELS="$M" FRANK_QWEN38_CAMPAIGN="$C" FRANK_QWEN38_MNBT=1024 \
bash "$RUNNER" score "$M/rad/arm-w5nl64.rad" "$C/scores/arm1.json" --dry-run
[ "$(flag_value --max-num-batched-tokens <<< "$output")" = "1024" ]
# the step the argv quotes IS the number frank-archon.env owns — the campaign
# used to carry its own FRANK_QWEN38_MNBT=1024, a per-mode literal that
# measured a shape nothing serves; the alias and its override tests die with
# the shape change.
env_step="$(awk -F= '/^FRANK_ARCHON_MAX_BATCHED_TOKENS=/{print $2}' \
"$(dirname "$RUNNER")/frank-archon.env")"
[ "$ref_step" = "$env_step" ]
[ "$score_step" = "$env_step" ]
# calibration rides the shared step too. Its old exemption (8 seats at
# MNBT 65,536, "free throughput") is what made the container refuse to
# boot: at that step the engine charges a 10.65 GiB activation arena to
# the card, the experts fall to 10.98 GiB and the KV to 271 MiB —
# "0.0 full-length sessions", "startup stopped: out of memory", measured
# 2026-10-29 while kldref on the shared step ran 16 hours without fault.
run env FRANK_QWEN38_MODELS="$M" FRANK_QWEN38_CAMPAIGN="$C" FRANK_QWEN38_MNBT=1024 \
run env FRANK_QWEN38_MODELS="$M" FRANK_QWEN38_CAMPAIGN="$C" \
bash "$RUNNER" calib --dry-run
[ "$(flag_value --max-num-batched-tokens <<< "$output")" = "1024" ]
[ "$(flag_value --max-num-batched-tokens <<< "$output")" = "$env_step" ]
[ "$(flag_value --max-num-seqs <<< "$output")" = "$ref_seats" ]
# a step size that is not a token count is refused, never handed to the engine
run env FRANK_QWEN38_MNBT=broad bash "$RUNNER" kldref --dry-run
[ "$status" -eq 2 ]
[[ "$output" == *"FRANK_QWEN38_MNBT"* ]]
[[ "$output" == *"must be a token count"* ]]
}
@test "kldref refuses a corpus its window cannot hold, before the service is touched" {