The branch took f07b81e from main but not 121d23a, so a build of the branch
answered 500 "prompt (N tokens) + max_new (M) exceeds the context" to every
request without max_tokens, and to any with max_tokens at or above
context - prompt - 7, on Flash-Next and on Qwen3.6 alike. The hunk in
frontend/main.cpp is main's, unchanged.
tests/python/serve_max_tokens_check.py (make test-serve PORT=...) sends five
such requests to a running server: 0 of 5 before, 5 of 5 after, on
Flash-Next at 196,608 and on Qwen3.6 Q4_K_XL at 262,144 (RTX 4090).
REGINA-112.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
ref/qwen36.py --all-logits dumps result_output_all (the head at every position
of the last chunk), the reference a streaming runner is held to position by
position. qwen36_prefill_fixture.py's write() gains q8_embd (token_embd.weight
as Q8_0, a type a native pack's embedding kernel serves), reused by the runner
fixture.
qwen36_teacher_llama.cpp is llama.cpp's own greedy continuation of a prompt with
the head's logits per position and the routed experts at probed layers;
qwen36_compare_logits.py scores top-1 agreement, KL(ref || engine) per position,
the drift gate (one-sided: only a KL that rises with position is a leaking
state) and the routed-selection overlap.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
qwen36_runner_fixture.py writes the synthetic model at the real per-layer
geometry (the prefill harness's full4) as a file a native pack is built from,
builds the pack with iq_pack.py and a 4 x 16 profile, and dumps the oracle for
the 8/11/40-token cases, faithfully and with --act-quant q8.
qwen36_verify_test.cpp drives Verifier on that pack as generate does (the load
order, check_all, the decode config layer_verify_compatible requires, the cache
holding every expert) - the step-3 review's HIGH finding that no test drove the
window on qwen35moe. The 8-token window's residual after every layer and its
head logits per row against the oracle; the same rows from one-token windows bit
for bit; 8 + 3 with a commit; 40 one per window (base_ar). The reference is the
Q8 oracle, the engine rounding activations as ggml does.
qwen36_runner_check.py drives the strata binary end to end: the 40-token
sequence teacher-forced in three chunkings (base_c7, one chunk, base_ar), the
logits dumped per position, and the 4 KB mutation-sensitivity gate.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
The fixture is the prompt-path trunk plus the nextn block (Q8_0 projections, experts, head and embedding) on 76
tokens, with the pack cut from it. Every seam at every position against the Q8 oracle, the router's picks identical,
the argmax identical but near ties; the negatives (the hidden state first in the concat, hnorm skipped, the pairing
with position k) more than 5 % away; the captured round graph against the uncaptured forward; the prompt-side pass
for 64 cells and the forward after it. --real: the real file against llama.cpp's own MTP arm.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
The fixture script writes <out>/SKIP with the reason and exits 0 on the
ImportError (as the other fixture scripts do); prefill_qwen36_test exits 77 on
seeing it. 4090: the simulated missing numpy gives SKIP and 77; the real
fixtures still pass.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
A chunked run's error is the relative L1 of the sums over its chunks (the worst
7-row chunk said more about one token than about the kernel); the forcing copy
waits for its DMA (the prompt stream is non-blocking); a router rank swap is
allowed only where the oracle's own softmax puts the two experts within 2e-3
(the prompt path's router multiplies BF16-rounded activations: every swap seen
is a near tie of 2e-5 to 1.3e-3); the post-attention norm's gate is the
mixer's error passing through (2e-3); the Q8 oracle's numbers are reported
beside the F32 oracle's. The fixture's router runs at half the toy's gain so
the renormalisation rival is visible (5.7 %, was 1.3 %). The attention
branch's kernels are in the tree, so the pending-attention skip is gone.
4090: gdn3 and full4 pass, one chunk of 40 and chunks of 7.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
The attention layer of a model without an indexer takes the cherry-picked
kernels as the attention branch defines them: the shapes zero the three indexer
widths (qsa_dense), the capacity is qsa_selection_cap (every cell), no ids are
carved or passed (a null is the identity), the group G comes from the geometry
and any other ratio is refused by name before a launch. The own dense_ids
kernel goes (qsa_identity_ids is the explicit form). A model with no attention
layer at all (the harness's gdn3 fixture) has no primary attention state: the
reads of it are guarded. STRATA_PREFILL_ALLOC_TRACE=1 names the allocation
that did not fit.
tests/python/qwen36_prefill_fixture.py writes the synthetic model at the real
per-layer widths (gdn3: three DeltaNet layers; full4: plus the attention layer;
Q8_0 projections and experts, BF16-exact routers) and the oracle's dumps for 40
tokens, faithful, --act-quant q8, and the rival readings.
tests/cuda/prefill_qwen36_test.cpp runs the prompt path on them as one chunk
and in chunks of 7 with every layer's input teacher-forced to the oracle's
l_out, holds each seam to the dumps, checks the router's top-k, the negative
controls and the geometry refusals; CTest: prefill_qwen36_fixtures,
prefill_qwen36_test, prefill_qwen36_attn_test.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr