274 Commits
Author SHA1 Message Date
Robert KarlandClaude Opus 5.5 c59510e4e3 Notes: Flash-Next speed on main's build; Flash-Next and Qwen3.6 as two processes on one 4090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 12:34:35 -07:00
Robert KarlandClaude Opus 5.5 e7ae2c89e5 Merge qwen36-step4: the serve max_tokens check and the Flash-Next regression notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 12:06:01 -07:00
Robert KarlandClaude Opus 5.5 cb26d9b7d4 Notes: the Flash-Next regression check on the 4090 (serving, speed against production, ctest)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 12:05:24 -07:00
Robert KarlandClaude Opus 5.5 0513d5b718 Front end: leave the engine's 8-slot reserve out of max_new (121d23a from main); a check against a running server
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
2026-10-13 12:05:03 -07:00
Robert KarlandClaude Opus 5.5 e6026d4470 make_profile: --out is required; a bare run no longer overwrites the pinned Flash-Next profile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 11:55:33 -07:00
Robert Karl 21b2aa2acb Merge qwen36-step4: Qwen3.6-35B-A3B on a single GPU from 6 to 24 GB, beside Qwen3.8-Flash-Next
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr

# Conflicts:
#	docs/PLAN-qwen36-35b-a3b.md
#	frontend/main.cpp
2026-10-13 11:16:04 -07:00
Robert KarlandClaude Opus 5.5 d00d383340 README: --pcie-frac 1.0 repeats a request only below 16 misses per layer and window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 06:22:46 -07:00
Robert KarlandClaude Opus 5.5 c62adc0da3 Notes: REGINA-111, the 1080 Ti's five accuracy misses are the reference's spread; --pcie-frac 1.0 overflows to the CPU past 16 misses
No engine change. The '2000, DMA' runs were not GPU-only: the window stages
16 blobs and the rest of a layer's misses run on the CPU. Without overflow
the 1080 Ti's GPU path gives the same bytes at either cache size, as the 4090
does. llama.cpp on a second back end misses the rule against its own 4090
run on both fixtures; against the F32 oracle the engine is inside it on both
cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 06:21:28 -07:00
Robert KarlandClaude Opus 5.5 d2e781f063 Notes: A5 serving checks, the accuracy rule and decode speed on the 1080 Ti at the branch head
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 05:44:23 -07:00
lotherk 89f653e249 Merge container (Docker + P40 compose) 2026-10-13 13:40:52 +01:00
lotherk 13b8eeb64e Merge fit-max-tokens (fit-max-tokens option) 2026-10-13 13:40:52 +01:00
lotherk 9fb9968abd Merge pascal-sm61-build (sm_61/P40 support) 2026-10-13 13:40:52 +01:00
lotherk 570b5eb6c4 Container: build the unittest image in a Dockerfile; add a P40 compose example
Multi-stage Dockerfile: build (nvidia/cuda 12.8.1 devel, PASCAL=1) then a
runtime stage (nvidia/cuda 12.8.1 runtime), one binary (build/unbiased-strata),
a /health check. examples/compose/p40.yml shows a one-card Tesla P40 service
with the model, pack and MTP mounted read-only.
2026-10-13 13:27:34 +01:00
lotherk d9dc03abdb Front end: shorten a request's max_tokens instead of refusing it (--fit-max-tokens)
The engine keeps 8 cells of the context for itself, so the earlier check
(prompt + 1 <= ctx) promised more room than the engine would accept.  A request
whose max_tokens would run past the room left is now shortened to fit, or
refused with --no-fit-max-tokens (default: fit).
2026-10-13 13:19:31 +01:00
lotherk 6afd3ff4d8 Build: PASCAL=1 for the experimental sm_61/sm_60 (GTX 10-series, P40) build
Compiles CMAKE_CUDA_ARCHITECTURES=61 and passes -DSTRATA_EXPERIMENTAL_SM60=ON,
with an early error when nvcc is 13+ (which dropped sm_60/sm_70). Default
build is unchanged.
2026-10-13 13:19:00 +01:00
Robert KarlandClaude Opus 5.5 542b53b52d README: the 1080 Ti against llama.cpp on the same 52 GB host
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 05:10:11 -07:00
Robert KarlandClaude Opus 5.5 06c5a8eccc README: why Qwen3.6 greedy replies differ between runs, and the flags that make them repeat
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 03:27:09 -07:00
Robert KarlandClaude Opus 5.5 0b6a21cb47 Notes: why one greedy request gives different tokens on one server, and that every pass is within the accuracy rule
Two causes, both a choice between numerically different correct paths: a missed expert computed on the CPU
against the same expert on the GPU once the adaptive tier has brought it in, and a prompt state built by the
verify windows against the batched prompt path.  Every single-path configuration repeats bit for bit; every
state scored against llama.cpp teacher-forced along its own tokens passes the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 03:26:38 -07:00
Robert KarlandClaude Opus 5.5 c7825b470c Diagnostics: per-token logits from --serve, the llama.cpp teacher forced along given ids; --teacher-force refuses --mtp
STRATA_SERVE_LOGIT_TRACE=FILE writes, per emitted token, the head's five largest logits, the window's shape and
the experts it missed; STRATA_SERVE_LOGIT_DUMP=PREFIX the whole row per request.  Off by default; with neither
set the final binary gives the tokens of the one before it on the same request sequence.

tools/qwen36_teacher_llama.cpp: --prompt-ids and --force-ids, so llama.cpp scores every position of a run the
engine made, with the path that run took.

--teacher-force with --mtp filled the window with the drafter's guesses and committed them as the oracle's
tokens (70 of 400 top-1 on a run that scores 394 without --mtp): refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 03:26:28 -07:00
Robert KarlandClaude Opus 5.5 11496aae7d README: Qwen3.6 serving checks after the streaming fix; why the prompt cache skips the previous reply
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 02:35:59 -07:00
Robert KarlandClaude Opus 5.5 aedbaf7b1a Notes: A5 serving checks on the 4090 after the streaming fix; why checkpoint reuse is short in a plain chat
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 02:35:20 -07:00
Robert KarlandClaude Opus 5.5 3aa9eed522 Front end: chat_template_kwargs.preserve_thinking reaches the template
A plain two-turn chat reused only the first prompt up to its assistant
header (27 of 278 tokens in step5-serve.md; 18 of 128 here).  The cause is
the template, not the checkpoints: Qwen3.6's template renders a reply that
stands before the last user message without its <think> block (and, with
thinking off, without the empty block the generation prompt carried), so
the next request's tokens leave the generated ones right after the header
and the engine falls back to the checkpoint it keeps there.  A reply after
the last user message (a tool loop) keeps its reasoning and is reused
whole: pi's second and third requests reused 1,867 of 1,948 and 2,047 of
2,118 tokens.

The template has a switch for the plain-chat case, preserve_thinking; the
front end now passes it through.  With it and reasoning_content sent back,
Q4_K_XL on the 4090 reuses 551 of 569, 1,010 of 1,027 and 1,365 of 1,382
prompt tokens over four turns (18 / 110 / 123-of-171 without).  It is opt-in:
the earlier reasoning then stays in the context the model reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 02:34:33 -07:00
Robert KarlandClaude Opus 5.5 c3b41cc46a Front end: the answer's content streams as it is written (REGINA-110)
With "stream": true the front end sent reasoning_content per token and the
answer as one delta before the final chunk.  The cause was in run(): every
partial parse had its content cleared together with its tool calls, a rule
added with the image commit (46c46ec) so that partial tool-call JSON, which
the parser closes and normalizes on each token, could never change text
already sent.  That reason holds for tool-call arguments, not for the
answer: the Qwen3-Coder parser's partial content only grows.

The parse of a growing response is now StreamParse: reasoning and content
are published as they arrive, tool calls once from the complete parse.  A
partial parse whose content does not extend what was sent publishes nothing
for the content until it does, and the complete parse cannot take back
streamed text.  A non-streaming request is parsed once, at the end, instead
of after every token.

make test-chat-parser feeds seven responses a character at a time (reasoning
on and off, tools declared and not called, text before a call, one and two
calls) and requires the streamed pieces to add up to the whole parse, the
content to arrive in many deltas, and each call in one.

Checked on the RTX 4090 (VM 221), Q4_K_XL: 212 content deltas for the
ticket's 213-token request, first at 76 ms, largest gap 11.5 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 02:17:55 -07:00
Robert KarlandClaude Opus 5.5 f3e0787320 README: the Qwen3.6 ladder on both cards against llama.cpp; the plain Q4_K_XL file's SHA-256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-13 02:10:38 -07:00
Robert KarlandClaude Fable 5.1 772ab1289d Plan: timeline videos of prefill and decode are a standing deliverable of the measurements
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 23:26:59 -07:00
Robert KarlandClaude Fable 5.1 bbb767600d Plan: the hierarchy is VRAM plus RAM by decision; the NVMe tier is out of scope
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 23:25:11 -07:00
Robert KarlandClaude Fable 5.1 f778c13ec5 README: RAM is a requirement; the file tier is a fallback, not a supported configuration
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 23:24:43 -07:00
Robert KarlandClaude Fable 5.1 7f00b1e52a README: RAM per rung is part of the hierarchy; the measured disk-bound case named
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 23:24:10 -07:00
Robert KarlandClaude Fable 5.1 7ebc9e53c5 front end: the served context is the engine's; the automatic mapped tier skips a shared arena and the helpers
From the second Codex review of fa69e82.  The engine's READY line carries
the context it allocated (`READY <max_context> stop`); when its VRAM plan
lowered the request, the front end kept validating prompts against --ctx
and announcing it.  It now reads the figure, bounds requests by it and
says so.  The automatic mapped-experts choice is not taken with an
explicit --shared-expert-arena or with the multi-GPU helpers.  The plan's
session term keeps the RoPE table sized at the requested context when
lowering (at most 32 MiB conservative from 262,144 to 131,072): noted in
docs/qwen36-port/step5-serve.md, not threaded through the plan.
main.cpp syntax-checked on the Mac; the CUDA build follows when a card is
between measurements.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 21:33:11 -07:00
Robert KarlandClaude Fable 5.1 45c4db2af5 docs: step 5 serve notes carry REGINA-106, the RAM tier and the planner corrections
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 21:12:51 -07:00
Robert KarlandClaude Fable 5.1 fa69e822e1 expert pool: the multi-token dispatch at the layer's width; the planner's drafter head and K/V; the RAM tier chosen by the plan
REGINA-106 (step5-1080ti): on the 1080 Ti host every expert miss computed
by the CPU pool degraded the logits (iq3-test20 at --expert-cache 2000
--pcie-frac 0: 51/64 top-1, mean KL 0.84; Q4 54/64, KL 0.23), DMA misses
were correct, one worker reproduced it bit for bit, --spec 1 changed it.
expert_pool_dispatch_multi (expert_source.cpp) pulled in the canonical
widths and read token t's activation at t * H (2560) and wrote its output
row at i * H, while the verify window publishes both at the layer's width
(2048): every token after the first of a group used another token's
activation and landed in another row.  The dispatch now takes the width
from the layer's NativeFmt (the canonical pack keeps H), refuses a layer
the pack lacks or a width above the compiled buffers.  After the fix on
VM 211 (Pascal, Zen 1): iq3-test20 / prime / psim with CPU misses 64/64,
64/64, 64/64, mean KL 1.4e-3 / 4.8e-3 / 2.0e-3; q4-test20 62/64 KL 6e-3,
q4-prime 64/64 KL 8e-4.  The Codex review of 22d72e6 named this spot
(the pool test covers the pool phases, not this dispatcher).

The VRAM planner (generate.cpp), also from that review: without a
draft_vocab.bin the drafter scores with the target's head and allocates no
copy (mtp.cpp), so only its logits are charged (515 MiB returned to the
expert cache at Q4); under --kv k8v4 the drafter keeps plain INT8 K/V and
is charged as such; a context the plan lowered is now the context the
engine allocates for, said in the log.

The RAM tier: when the resident arena exceeds the host's memory limit or
available RAM (the plan's 12 GiB rung: the 4090 sweep's --ram-cap 12
points died in ArenaExpertSource), the engine takes the mapped mode with
the hottest experts copied into RAM by profile rank (--resident-experts)
itself, which is the split its plan line already assumed.  The multi-GPU
expert helpers (--peer-device, --remote-expert-opt) keep the canonical
width and are refused for this model with a message.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 21:12:15 -07:00
Robert KarlandClaude Fable 5.1 69c2f05c8d README, UPSTREAM: Qwen3.6-35B-A3B as the second supported model; the sizing rule; the fat binary default
The README names both models and their hardware, the build's new
CUDA_ARCHS default, the Qwen3.6 serve command and engine flags, the files
with sizes and checksums (the plain Q4_K_XL file's hash is still to be
taken: QWEN36_Q4_PLAIN_SHA), the sizing rule in words with the planner's
figures per budget, what was checked on the 4090 and on the 1080 Ti, and
the known problems.  UPSTREAM.md gets the pack and draft-pack commands
and every prepared file's SHA-256; the patch note says it is applied at
configure time.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 19:56:55 -07:00
Robert KarlandClaude Fable 5.1 1e40b06dc9 make build: every single NVIDIA GPU from Pascal up in one binary by default; archs the toolkit lacks are dropped
CUDA_ARCHS defaults to 61;70;75;86;89;120 (STRATA_EXPERIMENTAL_SM60 follows
from the 61 / 70 as before).  The list is filtered against `nvcc
--list-gpu-arch` with a note for what is dropped, so the default builds on
CUDA 12.4 (no 120: VM 221 built 61;70;75;86;89 in 6 min 17 s at -j 14) and
on CUDA 13 (no 61 / 70) alike; without nvcc on the PATH the list is kept
as given.  `make build CUDA_ARCHS=61` is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 19:51:57 -07:00
Robert KarlandClaude Fable 5.1 38f9a7033a docs: the full 4090 ctest of the integrated tree is done
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 19:51:11 -07:00
Robert KarlandClaude Fable 5.1 94996ccf1f docs: step 5 serve notes - the three faults below full residency, the isolation table, what the 4090 serves
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 19:43:46 -07:00
Robert KarlandClaude Fable 5.1 22d72e69e7 pool: the native-pack rows at the layer's widths, not the canonical FF / H; the served model's name from its file
Every verify window with an expert miss computed on the CPU decoded to
token 0 ("!!!!") on both Qwen3.6 files: the first serve of the Q4_K_XL
pack at 262,144 context (9,980 of 10,240 experts resident) and IQ3_XXS
under any --vram-cap.  Found by elimination on the 4090: all-resident runs
were correct at every context and KV format, --pcie-frac 1.0 (misses by
DMA, computed on the GPU) was correct, --pcie-frac 0 (misses on the CPU)
was wrong with ggml's plain dot products, with one pool worker and on the
IQ3 file alike.

ExpertPool::run_split_multi_native split its gate/up and down phases over
FF (640) and H (2560) rows per expert, the canonical Q2_0 pack's widths
compiled into expert.hpp, while a native layer's NativeFmt carries its own
n_ff / n_embd (512 / 2048 here): the down phase wrote 512 rows past every
output row into the next token's, the gate/up phase read 128 rows past
each expert's block.  The phases now take the layer's widths; native_fmt
refuses a layer wider than the pool's SplitBufMulti buffers (H x FF).

tests/core/pool_native_widths_test: three Q8_0 experts at 2048 x 512, four
tokens, the pool's rows against the kernels called directly, bitwise
equal, and a guard after every output row.  It fails on the old row
counts (the guard) and passes now.  After the fix on VM 221: Q4 at 8K with
forced CPU misses 328 tok/s correct, Q4 at 262,144 by default 322 tok/s
correct, IQ3 at 262,144 under --vram-cap 11264 (5,762 slots, 56%) correct
at 169 tok/s; the Qwen3.6 and native-expert ctest subset 32 of 32.

The front end reported every model as "qwen3.8-flash-next-iq3_xxs"; the
id is now the GGUF's base name without a shard suffix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 19:42:41 -07:00
Robert KarlandClaude Fable 5.1 121d23ac2e Front end: leave the engine's 8-slot reserve out of max_new
The engine refuses a request unless prompt + max_new + 8 <= context, but
the front end sized max_new as context - prompt, so any client asking for
more tokens than remained (pi sends max_tokens 32768 on a 64K card) was
refused with "prompt (N) + max_new (M) exceeds the context" on every
prompt longer than context - max_tokens. Seen on the 1080 Ti Coder right
after a pi compaction left a 48K prompt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
v0.0.1
2026-10-12 19:27:36 -07:00
Robert KarlandClaude Fable 5.1 3a806b5af2 serve: the conversation checkpoint and snapshot carry a dense, plain-residual model; draft_vocab.bin optional
The first request through the HTTP front end on the 4090 generated 220
tokens and then failed with "saving a conversation checkpoint failed":
conversation_state.cpp rejected Qwen3.6's geometry key (idx_q_heads,
idx_key_dim and hc_lr are 0 without an indexer and without
hyper-connections), demanded the indexer's tail, dead-row, block-position
and pooled buffers per attention layer, and sized a block position per
layer; conversation_snapshot.cpp's K/V layout refused idx_key_dim 0.  Those
zeros are now the geometry: the key check allows them where has_indexer()
is false (hc_lr where hc is 1), the running-state targets keep only the
cell bound for dense attention, the block position and pooled rows are 0
without an indexer.  Verified on VM 221 at 262,144 context with the IQ3
pack: a two-turn conversation saves 1 then 2 checkpoints and the second
prompt reuses its prefix (27 of 278 tokens; the reuse granularity is a
step-5 measurement), 319 and 359 tok/s decode.

The front end required draft_vocab.bin in the --mtp directory; a Qwen3.6
draft pack built with the full head has none and the engine already treats
the file as optional, so the front end does too.

qwen36_verify_test: the 40-position argmax gate skips near ties, both where
the F32 and Q8 oracles disagree and where the Q8 oracle's top-two margin
is below the engine row's own rel L2 error (position 4 of the fixture
flips between runs on the 4090 with a 0.4% margin under a 1.4% row error).
35 of 35 discriminating positions agree; the ties are reported with their
margins.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 19:23:09 -07:00
Robert KarlandClaude Fable 5.1 6c644bb7d9 docs: the five-arch fat binary builds on VM 221; sm_120 needs a newer CUDA toolkit
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 18:54:16 -07:00
Robert KarlandClaude Fable 5.1 9542ec8ded docs: step 4 integration notes; the runner notes carry the 1080 Ti pass, round 8 and REGINA-104's resolution
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 18:46:43 -07:00
Robert KarlandClaude Fable 5.1 e73adc6624 build: the chat-parser patch applied at configure time; make build turns STRATA_MMQ_KQUANTS on
REGINA-104 (a Qwen3.6 tool call dropped when its required parameter is not
written first) was upstream's required-first rule running unpatched: the
any-argument-order patch was applied only by `make build`, and every VM tree
of the port was configured with cmake directly, on a copied submodule.
Qwen3.6's template routes to the Qwen3-Coder parser the patch covers, so
CMake now applies it when third_party/llama.cpp is configured (patch -p1 -N,
a reverse dry run first so an applied tree is a no-op; a tree the patch does
not fit fails the configure instead of building the wrong parser).  Verified:
a fresh submodule checkout reports the patch applied and a second configure
says nothing; on VM 221 the rebuilt libllama-common parses `limit offset
path`, `offset path limit`, `path limit offset` and `path` on
Qwen3.6-35B-A3B-UD-IQ3_XXS.gguf (make test-chat-parser PASS).

`make build` also passes -DSTRATA_MMQ_KQUANTS=ON: the Q4_K_XL file's Q6_K
down experts take the MMQ prompt path (docs/qwen36-port/step3-experts.md),
which that option builds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 18:45:33 -07:00
Robert KarlandClaude Fable 5.1 85d5d1234f Front end: SSE keepalive comment after 15 s without a delta; cancel the generation when the client is gone
Content and tool calls are published only once the message is complete, so a long answer is silent for minutes. pi's HTTP idle timeout (5 min) then dropped the stream, retried the same prompt, and the engine finished the orphaned generation first: a 21,826-token turn on the 1080 Ti ran twice. The per-token callback now writes ': keepalive' when 15 s pass without an emit; a failed write cancels the run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 18:31:26 -07:00
Robert KarlandClaude Fable 5.1 6042a32684 vram plan: the drafter's whole share - its K/V over the context, the draft head, the ids
The step-2 line (the draft block's weights + 16 MiB "ring KV and logits")
undercounted Qwen3.6's drafter (step4-drafter.md section 7): its K/V is the
whole context, not a ring (dense attention has no --kv-resident), in the --kv
format over its one attention layer (512 MiB fp16 / 144 MiB q4_0 at 262,144
cells); the draft head is the pack's vocabulary subset at the head's row bytes
(221 MiB on the Q8_0 head) plus 8 x n_vocab logits; the identity ids are T x
cells x 4.  The planner takes them as inputs (the per-token ones lower with the
context), prints the breakdown, and counts no drafter without --mtp, which the
plan says.  generate.cpp fills them from the file's census and the draft pack's
draft_vocab.bin; vram_plan_test checks the share, the derivation, the lowering
and the no-drafter line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 18:30:29 -07:00
Robert KarlandClaude Fable 5.1 d6800c2a45 docs: step 4 runner notes - the gate lift, the verify and runner tests, both files' numbers
What the engine now does with a Qwen3.6 pack, the hunks (file:line) in the
shared generate.cpp and verify.cpp, the three tests and their tolerances, and
the results: the window and runner tests pass on the 4090; IQ3_XXS and Q4_K_XL
teacher-force to llama.cpp at 61-64/64 top-1 with no rising drift; the step-3
parity suite is 100% of 33 after the gate lift.  The 1080 Ti pass and the Q4
11 GB fit are the remaining items, blocked on the card's lock; the chat template
finding is REGINA-104.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 18:30:29 -07:00
Robert KarlandClaude Fable 5.1 bcc7cc8960 tools: the real-file reference and the per-position logits comparison
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
2026-10-12 18:30:29 -07:00
Robert KarlandClaude Fable 5.1 bc0b297069 tests: the verify window and the streaming runner on a Qwen3.6 native pack
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
2026-10-12 18:30:29 -07:00
Robert KarlandClaude Fable 5.1 b4ee41e14e [shared] verify: the commit captures skip the indexer tail without an indexer
Both commit graphs restored every attention layer's indexer key tail and
re-appended the accepted keys, which needs blk.N.indexer.k_norm.weight: the
first Qwen3.6 window on the real pack stopped there ("blk.3.indexer.k_norm.weight
is missing") after the window itself had run.  A dense model has no tail to
restore; its K/V cells past the accepted prefix are overwritten when those
positions run again, as the header says.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 18:30:29 -07:00
Robert KarlandClaude Fable 5.1 1f5ef7daf6 generate: the step-2 gate lifted - a Qwen3.6 native pack loads, prefills and decodes through the verify window
The qwen35moe start no longer stops after the VRAM plan: it proceeds through
the native pack's load order (pack_load_check's, with check_all after the
dense projections, which generate never called), the session at hc = 1 with
no PLE and no indexer, the expert tiers the plan sized, the prompt path and
the decode windows.  The drafter is not wired yet (qwen36-step4-drafter):
without --mtp the windows hold one token each (a window padded with token 0
verified a draft nobody made), and --spec below 2 becomes the verifier's
smallest window instead of the native pack's refusal.

--teacher-force (with --spec-oracle FILE) holds the engine to a reference
continuation position by position: every window row commits, the next window
starts from the oracle's token, --dump-logits writes one row of head logits
per position (the window path wrote none), and the run reports the top-1
agreement.  That is how the real files are compared with llama.cpp's greedy
text (docs/qwen36-port/step4-runner.md).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-12 18:30:29 -07:00
Robert KarlandClaude Fable 5.1 f07b81e08b Front end: SSE keepalive comment after 15 s without a delta; cancel the generation when the client is gone
Content and tool calls are published only once the message is complete, so a long answer is silent for minutes. pi's HTTP idle timeout (5 min) then dropped the stream, retried the same prompt, and the engine finished the orphaned generation first: a 21,826-token turn on the 1080 Ti ran twice. The per-token callback now writes ': keepalive' when 15 s pass without an emit; a failed write cancels the run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 15:07:32 -07:00
Robert KarlandClaude Fable 5.1 bd0071bbb6 Qwen3.6 step 4 drafter notes: the agreement numbers, the pack row by row, the block on the plain graph, both cards' runs, what the runner consumes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
2026-10-11 14:36:13 -07:00