frank-large: raise ctx to 262144 to close the harness 400-zone
The harness clamps max_tokens to min(45056, contextWindow - est - 4096), its chars/4 est under-counts the rendered prompt by ~3 % (measured: 152,938 -> 157,388 and 158,906 -> 165,301), and compaction fires only at 85 % -- so with window == engine ceiling 200192, every request in the est ~146k-184k zone was a guaranteed 400. HALOGEN_CTX=262144 (native) + KV pool 524288; harness window 217088 = ceiling - 45k absorbs the estimate error (worst-case request ~219k <= 262144). models.yml updated out-of-repo: contextWindow 217088, maxTokens 45056.
This commit is contained in:
+28
-15
@@ -2,7 +2,7 @@
|
||||
# Seam: frank-large serves the Quat3rnion ABLITERATED Swift1.5 finetune of
|
||||
# peonist's Qwen3.8-Flash-Next v2 checkpoint (a .hgn flash-server payload)
|
||||
# on the Strix Halo iGPU through the halogen-flash-server CONTAINER (0.16.2,
|
||||
# digest-pinned), driven by the root unit's serve script — two 200,192-token
|
||||
# digest-pinned), driven by the root unit's serve script — two 262,144-token
|
||||
# slots with the MTP head always on (HALOGEN_SPEC_ADAPT=0) and the vision
|
||||
# tower mounted. 2026-10-06 cutover from the halogen 27B-dense shape.
|
||||
#
|
||||
@@ -80,8 +80,8 @@ good_env() {
|
||||
"FRANK_LARGE_VISION_BYTES=0"
|
||||
"FRANK_LARGE_TOKENIZER_FILES=tok.json"
|
||||
"HALOGEN_MODEL_ID=frank-large"
|
||||
"HALOGEN_CTX=200192"
|
||||
"HALOGEN_KV_POOL_POSITIONS=400384"
|
||||
"HALOGEN_CTX=262144"
|
||||
"HALOGEN_KV_POOL_POSITIONS=524288"
|
||||
"HALOGEN_KV_SLOTS=2"
|
||||
"HALOGEN_SPEC_ADAPT=0"
|
||||
"HALOGEN_MAX_TOK=8192"
|
||||
@@ -263,8 +263,8 @@ $(cat "$TEST_TMP/serve.log")"
|
||||
[[ "$output" == *"--name frank-large-halogen"* ]]
|
||||
[[ "$output" == *"--publish 7770:8731"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_MODEL_ID=frank-large"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_CTX=200192"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_KV_POOL_POSITIONS=400384"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_CTX=262144"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_KV_POOL_POSITIONS=524288"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_KV_SLOTS=2"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_SPEC_ADAPT=0"* ]]
|
||||
[[ "$output" == *"-e HALOGEN_CHECKPOINT=/models/qwen.hgn"* ]]
|
||||
@@ -280,16 +280,29 @@ $(cat "$TEST_TMP/serve.log")"
|
||||
! grep -q 'PODMAN wait' "$TEST_TMP/serve.log"
|
||||
}
|
||||
|
||||
@test "the shipped env pins the fleet's window and shape" {
|
||||
# 200192 is the per-slot hard ceiling (a longer prompt is a 400
|
||||
# naming the limit, never a silent truncation), and the harness
|
||||
# compaction math must fit prompt + budget under it: OMP compacts at
|
||||
# 70% = 140134, and 140134 + 57344 = 197478 <= 200192. models.yml
|
||||
# contextWindow must quote the same number or the harness discovers
|
||||
# the wall as a 400.
|
||||
grep -qE '^HALOGEN_CTX=200192$' "$ENV_FILE"
|
||||
ctx=200192
|
||||
[ $(( ctx * 70 / 100 + 57344 )) -le "$ctx" ]
|
||||
@test "the shipped env keeps the harness fit law inside the ceiling" {
|
||||
# 262144 (the checkpoint's native window) is the per-slot hard ceiling
|
||||
# (a longer prompt is a 400 naming the limit, never a silent
|
||||
# truncation). The harness clamps max_tokens = min(45056, 217088 − est
|
||||
# − 4096), compacts at 85 % of its declared 217088 window, and its
|
||||
# chars/4 est UNDER-counts the rendered prompt by ~3 % on code/agent
|
||||
# traffic (measured 4,450 tokens at est 152,938 on 2026-10-07 — with
|
||||
# window == ceiling, every request over ~146k est was a guaranteed
|
||||
# 400 before compaction could fire at 85 %). The 45k gap between the
|
||||
# harness window and the engine ceiling must absorb that error at
|
||||
# both monotone maxima of est + budget (est ≤ 217088 − 4096):
|
||||
# full budget at the compaction threshold: 1.03*184524 + 45056
|
||||
# clamped budget at the clamp's zero point: 1.03*212992 + 0
|
||||
# and the compaction request that rides on frank-secondary (its
|
||||
# 200,704-token slot) must fit: input ≈ threshold − keepRecent(20k).
|
||||
grep -qE '^HALOGEN_CTX=262144$' "$ENV_FILE"
|
||||
ctx=262144
|
||||
hw=217088; mt=45056
|
||||
thr=$(( hw * 85 / 100 ))
|
||||
[ $(( thr * 103 / 100 + mt )) -le "$ctx" ]
|
||||
zero=$(( hw - 4096 ))
|
||||
[ $(( zero * 103 / 100 )) -le "$ctx" ]
|
||||
[ $(( (thr - 20000) * 103 / 100 )) -le 200704 ]
|
||||
}
|
||||
|
||||
@test "no HIP-sensitive bare names leak through the env file" {
|
||||
|
||||
Reference in New Issue
Block a user