Skip to content

vt(kernel): contract the flash-order arm's vkq V accumulation per the pinned build - #3608

Open
lu-zero wants to merge 67 commits into
localai-org:mainfrom
lu-zero:row/KERNEL-ATTN-PAGED-ggml-flash-order
Open

lu-zero wants to merge 67 commits into
localai-org:mainfrom
lu-zero:row/KERNEL-ATTN-PAGED-ggml-flash-order

Conversation

@lu-zero

@lu-zero lu-zero commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

vt(kernel): contract the flash-order arm's vkq V accumulation per the pinned build

The ggml-flash-order arm's per-key V accumulation multiplied-then-added
(acc += v * vs) while ggml's fused NEON mad (ggml_vec_mad_f16_f32,
vec.h:467-474 @ llama.cpp 5f4d22289; our tree builds -ffp-contract=off
so the form must be explicit) accumulates as fma(v, vs, acc) - one
rounding instead of two. The kolibri1.1 exact-token campaign proved
the contracted form against the oracle bitwise (L0 flash core
67584/67584 after both the S-recurrence and vkq contractions).

Red-first: the suite's reference contracted identically (it was blind

  • the uncontracted kernel passed against an uncontracted reference),
    then the uncontracted kernel failed all four arm-vs-ref memcmp cases;
    the kernel fix returned green. A new bit-witness case pins one
    rounding (fma(0xbfe82651, 0x3f5bc584, 0xbf5770aa) = 0xc019821d) vs
    two (0xc019821c). Mutation: reverting the kernel fma reds 4 memcmp
    cases; byte-exact restore green. Sibling inertness suites unchanged.

Follow-up to #3605 (the S-recurrence half landed there; this is the
vkq half, extracted from the kolibri1.1 campaign's proven tree).

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]

lu-zero and others added 30 commits November 30, 2026 02:49
… paged-attention kernel

The kolibri11-u3 lane localized the last token divergence INSIDE the
attention core arithmetic: the oracle computes attention through ggml CPU
flash_attn_ext (GGML_PREC_F32, F16 K/V, ggml-cpu/ops.cpp:8858-9076
f16_one_chunk @ 5f4d22289) while the default vt::PagedAttention body is a
two-pass softmax — same math, different fp accumulation order, fp-noise-scale
divergence (rel 2.1e-5 at (L13,pos1) with bitwise-exact inputs) that flips
greedy tokens at depth.

This adds an ADDITIVE per-call arm, PagedAttentionArgs::ggml_flash_order
(default false = the two-pass body byte-identical and untouched), implemented
in the CPU kernel: Q rounds onto the K vec-dot type's F16 grid BEFORE the dot
(ops.cpp:8933-8934,8972), the softcap folds per ggml's scale/=cap setup and
cap*tanhf (:8915-8925,8998-9000) rather than the default cap*tanh(s/cap), the
softmax runs ONLINE per key with the M/S/VKQ ms/vs rescale (:9004-9034), V
widens into the f32 accumulator via the typed read (:9024-9032), the per-head
sink joins AFTER the key loop (:9038-9053), and the final scale is 1/S
(:9064-9065). The paged jmin..jmax walk is unchanged, so the causal/window
semantics stay the kernel's own.

RED-first: the gate test failed to compile pre-arm. GREEN 4 cases / 16
assertions: inertness (default == the transcribed two-pass body
byte-for-byte), arm == the GgmlFlashOrderRef transcription byte-for-byte
(F16 KV, F32 KV, intersecting sliding window, the ggml softcap fold), and
the discriminator (arm != default on the same fixture). Mutation
`S = S*ms + vs` -> `S = S + vs` reds 4/4 cases; restore byte-identical,
green again. Sibling paged gates unchanged (test_ops_paged_attn, _dtype,
_neon, test_ops_dflash_paged_block_attn, test_paged_attn_route all RC=0).

Unreached by design: NO model sets the field — this is the seam + tests
slice, and the kolibri1 consumer rewiring is the follow-up wave owned by
issue ISSUE-LOCAL-01M8MYQZRAX0KV2SV497RT2MRR. The reference is the scalar
f32 transcription of ggml's order; a live-oracle bit-proof of ggml's SIMD
lane grouping stays with the consumer wave. Evidence:
.agents/evidence/vt-flash-order-20261130/.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…der arm with its dated landing evidence

The issue owns the seam arm landed at a6a5338 and stays OPEN for the
consumer rewiring wave (kolibri1 sets the field; the live-oracle SIMD lane
bit-proof of ggml_vec_dot_f16 rides with it).

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
… paged-attention suite

Review finding F1 on the ggml-flash-order arm: the inertness guarantee
(default selection byte-identical to the pre-arm two-pass body) was only
detected inside the new arm suite. The sibling suite
test_ops_paged_attn.cpp compares at epsilon 1e-4..1e-5, and the arm's
default-flip divergence sits at ~2e-5 fp-noise scale, so a flip of the
field default left the sibling green while only the new suite redded.

Repair is additive: one focused pin in the sibling suite,
"paged_attention default body is byte-identical to the two-pass
transcription", which computes the reference from a scalar transcription
of the default two-pass body (same technique as the arm suite's
inertness pin) and asserts memcmp-level equality of the default path's
output on a multi-block varlen GQA fixture. No existing epsilon
comparison is touched; all 1838 prior assertions still pass.

RED-first evidence: with `ggml_flash_order` default-flipped to true, the
new pin fails (memcmp -1, test_ops_paged_attn rc=1) while the other 1839
sibling assertions stay green; after restoring the default all six
focused suites pass. Regression mutation: neutering the arm dispatch
(`if (false && args.ggml_flash_order)`) reds the arm suite 4/4 cases as
before, and both mutations were restored byte-for-byte (git diff clean).

Evidence: /tmp/vtfo-mut1-arm.log, /tmp/vtfo-mut1-sib.log,
/tmp/vtfo-mut1-sib2.log, /tmp/vtfo-mut2-arm.log,
/tmp/vtfo-green-*.log, /tmp/vtfo-preflight-f1.log (preflight --staged
rc=0).

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
Appends the dated F1 repair record to the lane log: the red-first
default-flip reproduction, the additive sibling pin, the mutation-2
regression check, the six-suite green run, and the staged preflight
result, alongside the commit SHA they belong to.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…er the pinned build

Extracted from the kolibri lane (afbe0b34f): ops.cpp:9039 @ 5f4d22289 writes
S = S*ms + vs, which the pinned gcc build (default -ffp-contract=fast)
compiles as one fmaf; this tree builds -ffp-contract=off, so the arm's two
recurrences (key loop and sink join) two-rounded, 1-ULP S differences that
flip greedy tokens at depth. Both are now std::fma(S, ms, vs).

Red-first: the test reference GgmlFlashOrderRef was itself uncontracted (the
gate was blind); contracting it first turned all 4 arm-vs-ref cases RED,
then the kernel fix returned GREEN. A new bit-witness case pins both
roundings at the traced triple (S 3f831d7c, ms 3dbb0870, vs 1.0f ->
3f8bf95b contracted, 3f8bf95c under two roundings). Mutation: kernel fma
reverted to mul-add -> 3/5 cases RED; byte-exact restore -> GREEN 5 cases /
18 assertions. Preflight --staged exit 0.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…'s ubatch chunking

The W1 Inkling-2-Mini gate is red at raw j=5 because llama-server
abca69200 (-b 16 -ub 16) computes a 10-token prompt in graphs of
1,2,6,4 tokens while our engine packs the whole scheduled range into
one forward; ggml's batched accumulation is shape-dependent, so
per-position Kcur differs exactly where the oracle's 6-token graph
ran (projection accumulation at pos 1,3,4, conv state hand-off at
2,5,6,7; kernels and quantization bit-identical). This row adds the
missing engine seam: a prefill ubatch knob, the llama.cpp split rule
pinned from source, and bit-exact state hand-off, so a gate that
pins the oracle's serving batch shape can also match its graph
formation. Model-local consumption rides the W1 row.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
…oint split

The decisive instrumented experiment (two clean passes, exact 10-token
golden prompt, cache_prompt=false, -b 16 -ub 16) observed the oracle's
real prefill formation: ubatches 6 then 4, produced by the llama-server
pre_decode checkpoint policy (checkpoint_offsets {4+n_ubatch, 4},
upstream PR #20288), NOT llama-batch.cpp splitting, which fills greedily
and never splits a 10-token prompt at ub=16. The record's 1- and
2-token graphs are load-time probes that survive --no-warmup, which
resolves the 13!=10 contradiction and falsifies the original spec
anchor; T1 is retargeted to (6,4) with a checkpoints-disabled boundary
case, and the residue analysis loses the probe-graph attribution.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
…'s server checkpoint split

The runner formed ONE forward per scheduler step, so a whole-prompt prefill
below the token budget computed every position in one graph while the
llama.cpp oracle the GGUF/CPU lane is gated against split the same prompt
into checkpoint chunks. This adds the missing ubatch-level seam:

- EngineParams::prefill_ubatch (the -ub analog, 0 = default = inert) wired
  through LoadedEngine to GPUModelRunner via set_prefill_ubatch.
- PrefillCheckpointChunks (include/vllm/v1/worker/gpu/prefill_chunks.h)
  transcribes the pinned llama.cpp abca69200 rule from
  tools/server/server-context.cpp pre_decode(): the fill loop breaks early
  at checkpoint_offsets {4 + n_ubatch, 4} when
  task->n_tokens() == prompt_n + min(n_batch, offset), gated on
  do_checkpoint (n_ctx_checkpoints ON for COMPLETION tasks, PR #20288).
  n_batch maps to the per-step max_num_batched_tokens budget. The {6, 4}
  observed sequence falls out of the rule; nothing is fitted.
- The forward site plans the chunk sequence BEFORE building forward input
  and runs one ModelRegistry::Forward per chunk, in order, only for eligible
  single-request gathered-logits prefill steps. The GDN state hand-off is
  bit-exact by address identity: every chunk's rebuilt metadata addresses
  the same persistent state slot, with has_initial_state from the chunk's
  own context. The final chunk carries the last-prompt-token lm_head row.
- tests/vllm/v1/worker/test_prefill_chunks.cpp: T1 table-driven rule (the
  (10,16,16)->{6,4} case plus boundaries and a 320-combination sweep), the
  T2 slice/planning gates, the T3 state-slot hand-off, and the T4 default
  inertness. RED was the missing-header compile failure; GREEN is 5 cases /
  1274 assertions. The multi-sequence mixed-prefill mirror stays Owed per
  the spec.

Focused ctest gate (prefill_chunks, runner, prepare_inputs, input_batch,
engine_core, llm_engine, engine_types): 7/7. Staged preflight: exit 0 after
repairing the ENG-MOE-LOADSTREAM anchor this change shifted in
.agents/engine-matrix.md (2576 -> 2580). The row's parity judge remains the
consuming model row's token gate.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…d pin the 4+ub offset order

Reviewer repairs for row ENG-CHUNKED-PREFILL (issue ISSUE-LOCAL-01M8FKEEA4VJBDK75035DR365J).

F1 (reachability): every prior ENG-CHUNKED-PREFILL case gated the pure rule
and the seam helpers, so a mutation that neuters the PlanPrefillChunks call
at runner.cpp:3302 (plan forced empty) left all of them green — the gate
could not see the feature stop existing. The new case
"ENG-CHUNKED-PREFILL: execute_model runs ONE forward PER CHUNK" enters
through the PRODUCTION entry point `GPUModelRunner::execute_model` on CPU
over a counting synthetic model (a LoadedModel + ModelFactory whose forward
records each call's token-row width, following the
test_device_token_ids_refusal.cpp fixture pattern): knob 0 → exactly ONE
forward over the whole 10-token range; knob 16 → exactly TWO forwards with
sizes (6, 4) in order. RED-first evidence: with the call site neutered the
knob arm fails `CHECK( g_chunk_forward_calls == 2 ) ... values: CHECK( 1 == 2 )`
and the size REQUIRE (1 == 2); restored, the case is green. This also
upgrades the earlier PROCESS.md caveat that T2/T3 were never exercised
through full runner execution.

F2 (T1 blind spot): the asserted table never exercised n_batch >
n_ubatch + 4, where the 4 + n_ubatch offset fires BEFORE the 4 offset. Two
new subcases pin it: (T=12, b=16, ub=4) -> {4, 4, 4} and (T=13, b=16, ub=8)
-> {1, 8, 4} — both assert the CORRECT pinned-rule values, and under the
reviewer's {n_ubatch, 4} mutation they give {8, 4} / {5, 4, 4} and RED
(test_prefill_chunks.cpp:101, :105 in the mutated run). A third subcase
(T=17, b=16, ub=32) -> {1, 12, 4} pins the min(n_batch, 4+n_ubatch) half,
which the mutation cannot reach. Note: the review finding's example value
{8, 4} for (12, 16, 4) was wrong under the pinned rule — offsets are
iterated in {4 + n_ubatch, 4} order and the first match breaks
(server-context.cpp:4480-4490 @ abca69200), so {4, 4, 4} is correct and
equally distinctive against the mutation.

No production code changed; no checker touched; CPU-only tests.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
… evidence

Append the timestamped repair-round entry to the row's PROCESS.md: the
reachability test name and its verbatim RED under the neutered call site,
the F2 table cases and their RED under the offset mutation, the focused
green set, the exit-0 preflight, and the repair commit.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
Taking main's engine-matrix wholesale during the rebase left the
ENG-MOE-LOADSTREAM anchor at main's pre-insertion line (2668); our four
loader lines move FromModelDir to 2672. Eight further stale anchors
were the branch's stale matrix hunk, removed by resetting the file to
main's version; this row adds no matrix row of its own.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
…the slice

The consumer-reported Inkling-2-Mini gate SIGSEGV inside
SliceCommonAttentionMetadata: inkling2_loop publishes its packed KV group as a
SlidingWindowSpec (kind kSlidingWindow), so the runner's full_attn_group_id_
stays the -1 sentinel (the selector only takes kFullAttention/kMlaAttention
groups, runner.cpp:846) and MakeCommonAttentionMetadata leaves the step's
slot_mapping EMPTY (the `group < slot_mapping.size()` guard is false for the
cast sentinel, backend.cpp:86-89). The whole-step path passes the empty vector
through untouched; the chunk loop sliced `begin() + begin` on it, and the
consumer's gdb frame was exactly that assign. T2's synthetic fixture always
populated slot_mapping, so the shape was never covered — a fixture gap, not a
transcription error.

The fix mirrors the whole-step behavior: an empty step-level slot_mapping rides
through empty; a populated one slices exactly as before. The new T2b case in
test_prefill_chunks builds the crashing shape (10-token prefill, empty
slot_mapping and block table) and was RED on the pre-fix header, GREEN after.
Mutation checks: forcing the runner's chunk_plan empty (runner.cpp:3366) reds
the F1 reachability case; reverting the guard reds T2b. Tree restored
byte-for-byte after each mutation. Focused set green: test_prefill_chunks 6/6,
test_prepare_inputs 9/9, test_runner 42/42 (CPU-only).

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…ord the outcome

The consuming Inkling-2-Mini W1 gate ran with chunking engaged (plan (1,4),
two ModelRegistry::Forward calls, stderr-verified in the exact failing run)
and the raw token gate did not move; the per-position pre/post-conv table is
byte-identical with and without chunking. Our quantized kernels compute each
output row independently, so the issue's premise — batch-shape-dependent
matmul accumulation that exact parity could repair by matching the oracle's
graph boundaries — is falsified by measurement. The residue's actual
mechanism is the kernel class (repacked vs vec_dot), owned by the consuming
row. This change closes ISSUE-LOCAL-01M8FKEEA4VJBDK75035DR365J on that
evidence, marks the spec DONE with an ## Outcome recording what was built,
measured, rejected, and why the knob-0 default and opt-in VT-style knob keep
their values, adds ## Now (seam landed, parity purpose falsified, W1
convergence re-owned by the consuming row's kernel-class wave), and notes in
## Owed that the seam's non-parity uses stand with no current consumer.
Records only; no product code.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…d falsification

The issue resolution and spec Outcome named the kernel class
(repacked vs vec_dot) as the residue mechanism; the consuming row
falsified that too within the day (QuantRepackMatmul bit-exact to the
ggml repack gemm on live rows, table unchanged when W1's projections
route through it). Both premises are now measured-falsified; the
mechanism is unidentified and the consuming row continues via a
three-way against the oracle's own captured kproj inputs.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
…emv/gemm twins and the fused Q8_K quantizer arms, opt-in

vt::cpu::QuantRepackMatmul gains the Q4_K and Q6_K repack twins so a model
no longer has to transcribe the serving oracle's kernels model-locally (the
kolibri11-u3 precedent, 5838c608b). Transcribed verbatim from the pinned tap
llama.cpp 5f4d22289 arch/arm/repack.cpp: ggml_gemv_q4_K_8x8_q8_K (:781),
ggml_gemv_q6_K_8x8_q8_K (:1570), ggml_gemm_q4_K_8x8_q8_K (:4015, NEON i8mm
arm), ggml_gemm_q6_K_8x8_q8_K (:4984, NEON i8mm arm); the SVE arms are not
transcribed because this host (and every host the i8mm predicate serves
here) exposes no SVE. The upstream kernels' fused vfmaq_f32 scale folds are
kept verbatim — the bit-identity target on this seam IS the oracle kernel, a
recorded deviation from the Q8_0 arm's non-fused vmla policy (the Q8_0 tier
stays byte-identical to the portable path). Dispatch mirrors the oracle's
forward_mul_mat shape: rows <= 3 the dotprod gemv over plain q8_K rows,
rows > 3 the 4-row i8mm gemm over BlockQ8Kx4 groups with leftover rows back
on the gemv.

The oracle binary compiles quantize_row_q8_K_ref under
-ffp-contract=fast, so nearest_int's magic add fuses into one vfma and our
contract=off build differs at 1-ULP ties (measured 396/7008 activation
bytes on a live kolibri row, 0/7008 random). Landed as ADDITIVE arms —
QuantizeRowQ8KFused and QuantizeRowQ8K4x8Fused (verbatim
ggml_quantize_mat_q8_K_4x8 plus the fused nearest_int); the default
BlockFromFloat table is untouched.

QuantRepackEligible/QuantRepackWeight extend to Q4_K/Q6_K (N%8==0,
K%256==0) behind the new VT_CPU_QUANT_REPACK_KQ opt-in (default off =
byte-identical to today): the repacked class is a different fp order, so a
default-on flip would silently move every k-quant model's outputs before
its consumers are re-proofed (kolibri11-u3, inkling2-w1, the qwen3_5 /
muse_glimmer keep-quant goldens, the deepseek_v4 stacked-expert
non-repacked contract). The coordinator flips the default when those
re-proofs land.

BIT-PROOF: tests/vt/test_quant_repack_kq_repack pins the seam BYTE-FOR-BYTE
to the tap build's exported kernels — 393/393 (fixture
tests/fixtures/quant-q4k-q6k-repack-oracle-f32.bin, generated by the scratch
generator in docs/bench-evidence/quant-q4k-seam-20261129/ against
/tmp/llamacpp-kolibri11-32891-build): the tap's quantize_row_q8_K bytes on
the 5 kolibri11 live rows, its ggml_quantize_mat_q8_K_4x8 bytes, its
repacked block bytes, and 40 kernel cases (live-row gemv m=1, gemm m=4, and
random Q4_K/Q6_K at m in {1,2,3,4,5,8} including the mixed case) through
the production vt::MatmulBTQuant entry with b.repacked set. In-test
discriminators: the default contract=off quantizer must differ from the
oracle on at least one live row, and the plain vec_dot class must differ
from the repacked outputs somewhere.

MUTATIONS (each followed by a byte-for-byte restore): magic constant +1.0f
in the fused quantizer (a first +0.5f attempt was a no-op below the f32 ULP
at 2^23 and stayed green — recorded); GemmQ4K8x8 bias vmlsq->vmlaq (14
failures); GemvQ6K8x8 high-bits mask 0x30->0x20 (8 failures; a first
mask-swap variant failed to COMPILE and left a stale binary reporting a
false green — the stale-binary hazard is recorded); the 4x8 quantizer's
bsums index shift (15 failures); disabling the Q4_K/Q6_K routing condition
in QuantRepackMatmul (the seam entry throws).

INERTNESS: ctest -R 'quant|repack' 28/28 on the default config;
test_kolibri1_gguf, test_deepseek_v4_gguf_load and test_flint_paged_engine
fail IDENTICALLY on the clean baseline ee9c3de (baseline run recorded in
.evidence/PROCESS.md) — pre-existing on this host, not caused by this
change. Preflight --staged exits 0 with six host-unavailable gates skipped
(x86/CUDA ISA builds, triton multiarch args, PR size needs the forge).

Fixes ISSUE-LOCAL-01M8M4B648PC33WK7K3ANACVVP in substance; the issue closes
when the row's coordinator records the landing. Spec note: this unit ran
under the row's committed spec umbrella (gguf-compute-in-quant-gemm.md /
the G7/G6 repack tiers); a row-level spec addendum for the q4k/q6k arms is
owed with the row's next lifecycle change.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
… location

The new K-quant test's fixture-synthesis helpers are used only by the
aarch64 oracle-tap cases; on x86 those cases compile out and
-Werror=unused-function failed build-test-cpu and build-newest-gcc.
Gate the helper block like the auxv include. The fixture's sha256
sidecar sat at docs/bench-evidence/.../fixture.sha256, a path the
pr-size classifier does not know; moved next to the .bin it hashes
under the classified tests/fixtures/ path. x86 build + test verified
green locally; arm path untouched.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
RandF16 and PlainRowBytes sit above the previously guarded block and
are consumed only by the aarch64-gated cases; -Werror=unused-function
still failed build-test-cpu and build-newest-gcc on x86. Extend the
guard and pair the preprocessor blocks.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
…h the landed work

ISSUE-LOCAL-01M7ZAHMYW87MPTAW4J78HYMB7 stayed OPEN with an empty Resolution
even though everything its problem statement asks for landed in b940a11
(PR localai-org#3583): both oracle pins (olala-transformers f781f124, llama-cpp-olala
bd20ca9b), both .agents/oracles records, and the W2 architecture-map spec,
with the forward waves since advanced through W2f. This fills the Resolution
with dated evidence, re-verifies both pins against the live upstreams on
2026-11-29 (code repos only, no weights downloaded), and names what still
keeps the issue open: the gateable=no measurement for both oracles, which
needs model weights and therefore developer authorization.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…uests

ISSUE-LOCAL-01M8TBA3XW1Y284PBJTYV8PWXS (consumer-found on the kolibri-1.1
lane) reports that the chunk continuation corrupts model state across
sequential requests: with chunking engaged, the 24-gate battery regresses
6/24 vs 7/24 unchunked and a standalone-exact prompt flips mid-battery. The
report's root-cause class names this seam: the state hand-off was validated
only on Inkling's GDN topology, and the chunk loop was suspected of skipping
a per-request reset the whole-step path performs.

This commit is the red-first reproduction the repair owed, and it reports
the honest outcome: the defect does not reproduce at the seam.

The T5 fixture (test_runner.cpp) extends the ChunkCountingModel fixture to
the sequential battery shape: two 10-token prefills back-to-back on one
chunked runner, request B admitted in the same step that retires A, then
B's first decode. Every forward's input is recorded — token/position rows,
chunk cams (query_start_loc, seq_lens, num_computed continuation markers,
slot mappings, block tables), GDN state slots and has_initial_state masks,
logits indices — and request B's chunked inputs are asserted to reassemble
to the unchunked path's single-forward inputs for the same request, field
for field.

The fixture is GREEN before any repair, 66/66 assertions: the chunk loop
derives every per-request artifact the whole-step path derives per step.
The GDN metadata builder is constructed fresh per request-step, the chunk
cams slice the step's own prepared per-group slot mappings, and the
multi-cache channels (kolibri-1.1's actual topology, one KV group per KV
source) ride through by shared pointer, so no per-request reset exists for
the chunk loop to skip. A static audit of the consuming model agrees: the
kolibri-1.1 forward holds no state across forwards, and its cache
writes/reads are addressed by the same metadata both paths produce.

Mutation: the F1 reachability mutation (chunk call site neutered at
runner.cpp execute_model) reds the fixture (REQUIRE(chunked.size() == 5)
fails, 1/7) and still reds the T2 forward-count test; the tree was
restored byte-for-byte and all three focused suites (prefill_chunks 1291,
prepare_inputs 61, test_runner 1993 assertions) are green on the restored
head.

Consequence: the battery delta (6/24 vs 7/24, one prompt flipping) does
not localize to this seam's orchestration. It sits inside the ULP
tie-cascade churn band the consuming lane itself adjudicated — it observed
5/24, 6/24 and 7/24 across its own builds WITHOUT this seam engaged. The
chunked-vs-unchunked bitwise difference the lane measured is the
MatmulBTQuant GEMM/GEMV dispatch by M, a shared-seam property, not a
metadata hand-off defect. Localizing further needs the kolibri-1.1
model-local path or the shared quantized-GEMM tie seam; both are out of
this row's scope, so no product change rides this commit.

The spec's Tests section gains T5 recording the fixture, the green-before
outcome and the escalation.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…k defect

The T5 fixture commit references ISSUE-LOCAL-01M8TBA3XW1Y284PBJTYV8PWXS,
which the consuming kolibri-1.1 lane filed in its own branched record tree;
this worktree's check-agent-record refused the reference because the
canonical file did not exist here yet. Import the file VERBATIM at its
canonical row path so the reference validates offline and the two trees
carry byte-identical authority for the issue. Open state unchanged; the
consuming row owns its resolution and re-verification.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…and exact token gate

W0 landed the inkling2_loop config builder and the loader still refuses the
model at the forward boundary, so no token can be generated. This spec fixes
the scope of the CPU forward: one sequence, prefill and decode, through
ModelRegistry::Forward and the paged engine, gated token for token against
llama.cpp. The Tenstorrent arm is W2.

The runnable oracle is llama.cpp abca69200 because the pinned vLLM forward is
nvidia-only and not gateable on this host (inkling2-vllm-pin-advance.md).
The commit carries the golden token ids for the mainline UD-Q4_K_M and
UD-Q8_K_XL arms in four modes each, and the measured relation to the earlier
33aeb17f8 captures: prompt and generated ids are equal for every prompt,
mode and arm.

Reference: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.4 [maki]
W1 turns the W0 parse-only inkling2_loop arm into a generated path. A
census-validated GGUF loader dequantizes the mainline-layout Q4_K_M and
Q8_K_XL arms to host f32, including NVFP4 experts with per-expert F32
scales; host ops port the llama.cpp abca69200 AttnRes mix, gated
cross-pass controller, clipped relative-bias attention with sinks and
sigmoid top-8 SiTU MoE; the registry and paged forward run the fixed
prelude, three core passes and coda through ModelRegistry::Forward.

The runner cannot allocate 48 slot-indexed caches (it resolves only 24
in-range .layers.<N>. names and forbids a layer in both groups), so the
loop slots are packed as disjoint head planes and channel blocks in one
attention cache and one short-conv state; the spec amendment records the
constraint and a unit test pins slot disjointness. The tokenizer maps
pre=inkling2 onto the GPT4O split with ignore_merges, with a parity test
over all oracle prompt texts in raw and chat modes.

The exact token gate is NOT yet green: the first greedy token matches,
then decode diverges. Focused evidence records the first differing index
and the named-resource constraints (NUMA-interleaved host needed for the
~100 GB f32 weight set) under
docs/bench-evidence/new-candidate-inkling2-w1-20261125/focused.log.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…stency

The runner samples over config.vocab_size, which W0 pinned to the GGUF's
padded vocabulary (201024), while the paged forward served only the
oracle's unpadded 200058 logits. A temperature-0 step therefore read the
padding bytes as logits and could return an id the oracle never scores.
Serve the full padded row with every padding slot at -inf and pin it with
a focused unit test.

Add a teacher-forcing consistency gate: the next token from a prompt plus
the oracle's first k generated ids must equal the k-th token of a plain
generation. It passes for k=1 and k=2 and proves the packed K/V page and
short-conv channel blocks are per-slot and persist across decode steps.

Record the developer's footprint decision: dequantize expert weights on
demand from memory-mapped stored types, tracked as
ISSUE-LOCAL-01M89VPD6BYJNCQA3NQNV34F9D, with the measured Q4_K_M peak RSS
and the 4x64 GB NUMA recipe in the spec. The exact oracle gate is still
RED; focused.log records the first differing indices and the oracle's
top-K at that position from the existing server build.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
Record the first-divergence index for all 12 oracle prompts: six raw
prompts fail at j=0, six chat prompts fail at j=2 with the same wrong id
89299 against oracle 371, independent of prompt text and length. This
weakens a conv-history or relative-distance-index explanation and points
at a systematic logits computation.

Audit the ported ops against llama.cpp abca69200: NVFP4 decode (UE4M3
scale and 2x E2M1 lut), AttnRes mix order/eps/scale, relative-bias gather
and tau, and the post-conv residual scale. Fix one real mismatch: ggml
folds the zero attention sink into the softmax MAX as well as the sum,
which the host op omitted. The exact gate remains RED; the first bad
layer and op are still unresolved and no tolerance or dtype was tuned.

The cross-prompt test is diagnostic only: it generates 8 tokens per
prompt and never changes the 128-token gate.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…ax sink

The oracle tap instrument (outside the repository, at
/tmp/llamacpp-inkling-tap) confirms Q/K/V, the relative projection, sink
logits and the packed KV cache rows agree with llama.cpp within 1% at layer
0. Three defects were found and fixed on the path to the first bad op:

- the short-conv post step was called with cur and out aliasing, so the
  recurrent history stored the amplified output and grew exponentially;
- GQA query heads map to KV heads in contiguous groups (h/(n_head/n_kv)),
  not h % n_kv_heads;
- ggml's soft-max folds the zero sink into the max as well as the sum.

The first bad op is isolated to layer 0's attention output (att_raw): its
relative error is still 1.59 after those fixes, while all its inputs agree.
Two length experiments are recorded: no tile threshold when prepending
neutral tokens, and the chat failure stays at the second decode step for
lengths 21/22 and 30/31. The exact gate remains RED; no tolerance or dtype
was tuned. The measurement-only env var is allowlisted.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…rt conv

The oracle tap instrument now agrees with this port to within 1% on every
layer-0 quantity (Q/K/V, relative projection, sinks, gathered bias, attention
output, lm-head input) after two more corrections: the gathered bias is in
score units (dot*scale + bias), and an AttnRes block boundary must keep the
attention output as the new residual instead of the layer input.

Across all 48 visits, l_out agrees for visits 0-4 and first diverges at visit
5, the first full-attention layer. Its Q/R/sinks and the K/V projections and
dynamic conv taps agree within 1%, but K/V after the short conv diverge
(K rel 0.48, V rel 0.70). The first bad layer and op are therefore layer 5's
dynamic short conv (attn_k_conv / attn_v_conv with their *_conv_proj taps).
The exact gate still diverges: the first five raw ids match the oracle and id
5 does not. No tolerance or dtype tuning.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
The oracle taps now agree with this port within about 1% on every layer-5
op at the last prompt position, and post-clip K/V agree (rel 0.006 / 0.008),
so the dynamic short conv is not a remaining structural defect. The exact
gate still diverges at generated id 5: the oracle ranks 161721 first with
a 0.6756-logit gap over its third candidate 151663, while this port has a
0.9407-logit gap and therefore selects 151663. The ~0.26-logit difference
is consistent with accumulated f32 reduction-order differences, not an
unwired mechanism. The focused log records the per-op table and both
candidate lists. No tolerance or dtype value was changed.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…messages

The contradiction between the gate failure and an earlier logit dump was stale data: the same binary now shows argmax 151663 and sampled 151663 at the failing position. Taps at that position agree for all 18 prelude visits and first diverge at visit 18, the first core layer of pass 1. The remaining defect is the per-pass bank/message mix or controller, not dot reduction order. No tolerance or dtype change.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true

AI-Assisted: true

Assisted-by: AGENT:hy4-flash-free [opencode]
The cheapest probe proves the visit-18 mapping is correct: slot 24 selects
physical layer 6 in pass 1 with a distinct KV/conv slot from pass 0 and a
one-block bank. bank_out agrees with the oracle at the failing position, and
a Python recomputation of Inkling2AttnRes from our own bank and bank_out
reproduces our message mix, so the mix arithmetic is correct.

The pass bank is now owned by copies rather than pointers into `blocks`,
which is replaced with the prelude block list before the messages are read.
This removes a latent dangling-pointer hazard, but the exact gate still
diverges at raw generated id 5. The bank-content comparison is inconclusive
because the env dump also captures decode steps with divergent state; a
per-step tagged dump is needed before a conclusion. No tolerance or dtype
change, no oracle pin change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
Fresh single-request taps show the oracle bank equals its ip=12 pass-0 block push exactly, and ours equals ours exactly; the bank agrees across implementations within 2 percent. The wrong-push suspect is disproved. The remaining loop_msg divergence appears to be our reading of the ggml mul_mat output layout, not the bank. No tolerance or dtype change.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true

AI-Assisted: true

Assisted-by: AGENT:hy4-flash-free [opencode]
lu-zero and others added 30 commits December 5, 2026 14:46
The ggml-level flash-op capture showed the kernel consumes F16 K and V
(llama-context.cpp:4441-4442 sets the KV cache type to F16), while our paged
cache stored the F32 projections directly. K/V are now rounded to F16 on
cache write, which is the value the oracle's flash kernel reads.

At il=0 the attention output improves from 1.89e-4 to 5.03e-5 relative and
l_out from 5.3e-3 to 4.2e-3; the unit suite stays green (194724/194724).
The exact gate is still red at raw generated id 5.

The tap build now also captures the flash op's actual q/k/v/mask/sink/output
tensors synchronously inside ggml_compute_forward_flash_attn_ext with exact
strides and types. The tapped binary reproduces the committed golden with the
capture enabled and disabled, so the instrument is passive. The capture whose
F16 mask matches our il=0 bias belongs to a different layer visit (only seven
valid keys), so it is not the failing il=0 attention; recomputing with seven
keys is worse than with all ten. No arithmetic change from that probe.

No tolerance or dtype change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
The per-position comparison at pos2 determined where the K/V drift enters:
the projection input rows agree at ULP (attn_in rel 2.09e-08) and their Q8_0
quantizations are byte-identical (0 differing bytes of 2448), so neither the
residual stream nor batch-dependent quantization is responsible. The ~1.4e-3
K/V difference comes from the dot kernel selected by batch shape: the oracle's
6-token graph uses ggml's nrc=2 i8mm mmla vec_dot while our host op always
uses the nrc=1 generic dot. Both are bit-exact against their own references.

A batched-prefill config change cannot bridge it: our engine already prefills
the 5- and 10-token prompts as single graphs (T=5/T=10), but batch size does
not select a different kernel in our implementation. Exact parity therefore
needs an nrc=2 mmla dot path (a real feature) or an explicitly ratified
near-tie gate; the developer decides. The exact gate stays red at raw j=5.

This also records the capture rule: exact-parity comparisons pin both sides'
serving batch shape and kernel selection (nrc), since Q8_0 activation
quantization and ggml's vec_dot dispatch are context dependent.

No tolerance or dtype change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…kernel

Developer-approved 2026-11-27 enlargement: the oracle's multi-token graphs
dispatch ggml's aarch64 i8mm mmla Q8_0 vec_dot, so the CPU arm selects that
kernel by shape (nrc>=2) while single-token decode keeps the proven generic
dot. No environment switch, matching ggml's shape-based selection.

The kernel is the tree's vt::cpu::QuantMmlaVecDot(kQ8_0) rather than a
duplicate transcription. Bit-proof against ggml's nrc=2 vec_dot compiled from
the pinned oracle tap build: 3000 randomized batched cases (k=32..1024,
large/tiny scales, block boundaries), 0 byte mismatches; golden output bits
pinned in the unit test (194728/194728 assertions). The spec amendment dates
the approval and records that other architectures are owed the generic path.

Gate remains red at raw generated id 5; wiring of the batched projection is
the next step in this wave. No tolerance or dtype change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…hape

The paged forward now routes prefill projections (T>=2: q/k/v/r/conv-proj/sink)
through Inkling2MatVecMmla, while T==1 decode keeps the proven generic kernel;
no environment switch, matching ggml's shape-based selection. The mmla helper
duplicates the weight and activation rows for the nrc=2 call, which yields the
same per-row result as a real two-row batch.

The gate is unchanged and still red at raw generated id 5. A direct offline
matrix falsified the nrc hypothesis for Q8_0 at k=2304: ggml generic, ggml
nrc=2, our generic and our mmla all agree bit-for-bit; only ggml's aarch64
nrc=1 ARM kernel differs from them. The 1.4e-3 K/V measurement therefore
predates the F16 cache fix and cannot be attributed to kernel selection.
No tolerance or dtype change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
… the chain

The last authorized instrument step failed: a backend-API harness with
CPU_REPACK buffer and ggml_backend_tensor_set aborts at ggml-backend.cpp:534
because ggml_new_tensor_* tensors own context data and are not bound to a
backend buffer. Faithful reproduction needs the scheduler's full allocation
flow, beyond the bounded step. The instrument hunt stops here.

Everything else in the chain is verified: projection inputs and Q8_0 integers
match; the four-family dot matrix (ggml generic, ggml nrc=2, our generic, our
mmla) is bit-identical; one_chunk nrc instrumentation shows zero invocations;
the server load log confirms every attention projection is repacked with
q8_0_4x8 into CPU_REPACK; the vt repack seam exists and is bit-identical;
F16 KV cache and flash attention are committed, with flash ULP on identical
captured bytes; and warmup graphs were separated from real prompt graphs.

The exact gate is still red at raw generated id 5. The gate-policy decision
is owed to the developer; no tolerance or dtype change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
Offline bit-proof against ggml_gemm_q8_0_4x8_q8_0 from the pinned tap build:
vt::cpu::QuantRepackMatmul differs on 4656 of 6400 outputs (100 randomized
[4,2304] x [16,2304] cases, small and x1000 magnitudes) by ~1.5e-6 relative.
The cause is the scale-multiply order: GemmTileQ8_0 uses vmlaq_f32 (FMA)
where ggml accumulates the product separately.

This is a SHARED seam kernel that other rows' parity rests on; changing it
unilaterally would be out of scope, so the finding goes to the seam owner.
It is ~1e-6 relative and does not explain the ~1e-3 K residue. The gate stays
exact and red at raw generated id 5; no tolerance or dtype change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
ISSUE-LOCAL-01M8EVYQFB7561HSRHS4DF2KGJ. The pinned ggml ARM repack source
(ggml/src/ggml-cpu/arch/arm/repack.cpp:5780) uses the FUSED vfmaq_f32; vt used
the non-fused vmlaq_f32. GemmTileQ8_0 now uses vfmaq_f32 in the same block
order, so the repacked tier is bit-identical to the oracle (0/6400, golden
0x2297b6b80999049e). The spec's inverted root-cause prose is corrected from
that source line.

The hermetic gate's old "repacked == generic, bit-identical" assertion was a
WRONG invariant, not a weak one: ggml's own repack tier (FMA) and generic tier
(scalar f32) differ bit-for-bit. It is replaced by per-tier reference equality.
The repacked tier is bit-identical to ggml's FMA tier on every shape, dtype and
stride. The generic tier is held to a scalar-order f64 restatement of ggml's
generic source (sumf[m][j] += sumi * dw * da in source order, floored to f32) at
max-abs 1e-5 at K=2304, measured 7.62939e-06. This is strictly stronger than
cross-tier identity: either tier drifting from its own counterpart now fails.
Larger-K shapes keep the repacked bit-identity rather than a tuned tolerance.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…_0 fix

These files are the missing self-contained test and evidence/record artifacts
from the QUANT-GGUF-CIQ-GEMM seam lane whose kernel fix was cherry-picked as
d63b864d0. They are taken from row/QUANT-GGUF-CIQ-GEMM-gemm-q80-fma only to
satisfy this branch's evidence/record checkers and to run the bit-proof test;
the RED pre-fix kernel state in that lane's earlier commit was deliberately
NOT brought over.

Seam fix by opencode-6c9065c1 / QUANT-GGUF-CIQ-GEMM lane.

Refs: ISSUE-LOCAL-01M8EVYQFB7561HSRHS4DF2KGJ
Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
Patched the scratch tap build at llama-graph.cpp:3789 to tap the pre-rounding
f32 K written into the KV cache for il=0, with --no-warmup and single-thread
capture. Golden 161721 with taps both enabled and disabled.

Per-position f32 Kcur comparison: positions 0, 8 and 9 match at ULP; positions
1..7 differ by 2e-5 to 2.6e-4. The f32 value already diverges before the F16
cache write, so our F16 conversion is not the source. The divergence is in
the batched K projection arithmetic for the oracle's 6-token graph shape.

No repository code changed by this probe. No tolerance or dtype change, no
push; gate still red at raw generated id 5.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
… table

Extended the scratch tap build's proven cache-write site with kproj (matmul
output) and kpostconv (conv output) dumps at il=0. --no-warmup, single-thread,
golden 161721 with taps enabled and disabled.

The table localizes two distinct op-class defects: projection accumulation at
positions 1, 3, 4 (matmul output differs even though attn_in matches at ULP)
and short-conv state hand-off at positions 2, 5, 6, 7 (matmul output matches
but conv output differs). Positions 0, 8, 9 match at ULP throughout.

No repository code changed by this probe; temporary taps reverted. No
tolerance or dtype change, no push; exact gate still red at raw j=5.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
…nfig

Rebased the W1 row onto the repaired chunked-prefill seam a2fdde9 and set
ep.prefill_ubatch=16 in the exact-token gate: a gate configuration that pins
the oracle server's serving shape, not an arithmetic or tolerance change.

Raw gate ids (mode=raw, "The capital of France is"): j=5 got 151663 want
161721; j=6 got 198 want 156021; j=7 got 33 want 68014. Chunk engagement was
confirmed in that exact run by a temporary runner probe (since reverted):
prefill plan (1,4) at a 5-token prompt, two Forward calls; decode steps empty.
The per-position preconv/postconv table with chunking on is unchanged from the
pre-seam table (projection differences at 1,3,4; conv-only at 2,5,6,7;
positions 0,8,9 ULP). No arithmetic hunting and no tolerance change.

Also repairs three stale record anchors the rebase surfaced; check-agent-record
reports ANCHOR-ROT=0.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
… checkpoints

Bit-proof of vt::cpu::QuantRepackMatmul against ggml_gemm_q8_0_4x8_q8_0 from
the pinned tap build: 0/6400 mismatches on 100 randomized batched cases with
one shared quantizer after the bb1da7d6 FMA fix. Routing W1's Q8_0 projections
through that repack path changed the per-position kproj/kpostconv table
byte-for-byte not at all, so the kernel class is falsified as the residue
cause; the wiring was reverted.

Also records the seam's chunk engagement (prefill plan (1,4) for the gate's
5-token raw prompt, two Forward calls), the unchanged raw gate ids (j=5
151663 vs 161721), and the open prompt/shape-parity question for a fresh
continuation. No arithmetic hunting, no tolerance change, no push.

Refs: ISSUE-LOCAL-01M7ZYAY4W7STQCBPSF6NQRF78

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:hy4-flash-free [opencode]
The wave asked whether the oracle's il=0 k_proj equals the ggml kernel on the
oracle's own captured inputs. It does, bit-for-bit, but only when the weight is
routed through the CPU repack buffer, which selects ggml_gemm_q8_0_4x8_q8_0 for
the nrc=4 prefill mul_mat. The same bytes and inputs through the plain-buffer
multi-row vec_dot path differ by ~1e-6 of ULP dust, and that dust seeds the
j=5 token flip. The fused-wqkv suspect is falsified at the oracle source: q,
k and v are separate mul_mat ops. Decode (nrc=1) agrees on every route, which
matches the golden prefix we already reproduce.

Our token-major prefill issues one-row projections, so it can never reach the
gemm tier; the repair is routing-only through vt::cpu::QuantRepackMatmul with a
layer-major prefill pass for T>=2. Evidence, harness, capture results and the
fix design are in the lane evidence directory.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…r inkling2 prefill

Two shared-seam and one port repair, all red-first bit-proven against the
pinned llama.cpp abca69200 oracle taps on the Inkling-2-Mini Q4_K_M arm.

vt::cpu::QuantRepackMatmul's from_float quantizer rounded ties away from
zero (scalar roundf) while ggml's aarch64 runtime tier (quantize_row_q8_0 /
quantize_mat_q8_0_4x8, vcvtnq) rounds to even. One exact-.5 tie byte in the
oracle's captured kproj_in row 3 corrupted a whole gemm row. New
QuantizeRowQ8_0Runtime (nearest-even magic-number trick) now feeds both
tiers; GemvRowQ8_0 accumulates with fused vfmaq_f32 to match ggml's arm gemv.
Bit-proof vs the oracle taps: gemm tier 4096/4096 and gemv tier 1024/1024
BITWISE on the real captured rows (the earlier "already bit-proven" harness
fed the reference the same roundf rule, so the tie class was invisible).
test_quant_gemm_q80_bits re-pinned to the runtime tie rule with an explicit
exact-.5 tie case; mismatches 0/6400 vs the real tap-build gemm kernel.

inkling2_loop paged forward is layer-major for the projection dispatch:
per-token input prep, then ONE Inkling2BatchedProj per repack-eligible Q8_0
projection over the whole prefill ubatch, then the sequential per-position
conv/cache/attention/MoE stage. Decode (T==1) keeps the proven arms.
inp_sa is captured before the norms because it feeds the residual; SWA
layers carry empty k_conv_proj shapes and are guarded. Hermetic suites
green; the golden-modes chat failure is byte-identical at HEAD f68f1ad47
(stash-baseline) and is therefore pre-existing.

Per-op adjudication at the failing k_proj positions (PROCESS.md wave 5):
with the tie fix, m=1 mmla == repack-gemm BITWISE on every captured row,
so the wave-3 scalar-order premise is falsified and the residual drift sits
downstream in the conv/clip path.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
… conv to ggml

Wave-6 bitwise taps at il0 on the 5-token prompt under the [1]+[4] chunk
config prove the static short conv was already exact, while the clip used
one fused scale factor, rms-norm divided instead of multiplying by the
reciprocal, and the short conv fused static and dynamic taps into one f64
sum. ggml executes two rounded multiplies for the clip
(ggml_scale(ggml_l2_norm(x,t),t)), a reciprocal-multiply rms-norm, and a
staged f32 conv (f32 sequential static sum in ggml_ssm_conv, then per-lag
f32 dynamic adds). With the restage, chunk-2 tokens 0-2 go from ~1e-3 to
0/1024 bitwise against the oracle taps; the remaining t3 divergence is
upstream one-ULP dust in the attention path transmitted through q8
activation-quantization boundaries. New hermetic tests pin the
discriminating f32 cases; they fail under the old arithmetic.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…roof

Re-lands the wave-5 adjudication record whose commit failed the trailer
gate, and records wave-6: the conv/clip stage proof (static conv bitwise,
clip/rms/conv staged-arithmetic repairs, chunk-boundary history carry
verified), the pinned remaining mechanism (upstream attention ULP dust
transmitted through q8 quantization at prefill row 3), and the bounded raw
gate leg (j=5 unflipped; raw[2] 21->33, raw[4] 6->68 improved).

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…vec_dot_f16_f32

The inkling2 attention mirror Inkling2AttentionStep scored keys with a
double-accumulating scalar dot while the pinned oracle's flash_attn_ext
CPU kernel executes ggml_vec_dot_f16_f32 (the K cache row is F16), whose
NEON branch widens the F16 key to F32 and runs ggml_vec_dot_f32 per
64-element chunk with the chunk results summed in ggml_float; and the
tree's -ffp-contract=off build left the online-softmax recurrence S =
S*ms + vs as multiply-then-add while the oracle binary contracts it to
one fmaf. Add Inkling2DotF32Vec (transcription of ggml_vec_dot_f32's
non-SVE NEON branch: four f32 accumulator vectors, step 16, pairwise
tree reduce, the executed binary's fmul+fadd groups-of-4 tail and
explicit-fma remainder) and Inkling2DotF16F32 (the f64-accumulated
per-64-chunk wrapper), make the two softmax recurrences explicit fma,
and pin both kernels with bit-exact goldens captured from the live
libggml-cpu.so of the pinned tap build under the project's own
-ffp-contract=off flags, each with a guard so the pin stays
discriminating.

Evidence: bitwise il0 chunk1 taps att_raw 640/3072 -> 0/3072 against
oracle taps.0001 (vclip 118/1024 and rclip 16/384 keep pre-existing
1-ULP dust, unchanged from the wave-6 capture, so the kernel is exact
given its rounded inputs); raw-only gate raw[0] first bad moves j=5 ->
j=21 (the 161721 near-tie flips) and raw[2] j=33 -> j=21, doctest 361
passed | 438 failed, exit 1. Mutant captures ours-w6c.bin (scalar dot,
att_raw 640) and ours-w7.bin (single-128 reduction, att_raw 485) stay
red. Remaining mechanism named in PROCESS.md: post-attention chain
(wo_raw/attn_out/l_out dust) and the vclip/rclip projection-input dust.
Hermetic suites 9/9 green; preflight --staged exit 0. No shared vt:: op
touched; no checker weakened; no tolerance tuning.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…ing and attn-res mix to ggml

The chunk-1 il0 tap bisect (extended oracle instrument with in2, wvproj,
relproj, gate_raw, wo_in and mix_states/mix_probs taps) proved the vclip and
rclip one-ULP dust enters after bitwise projection inputs: every norm mirror
squared in double where ggml squares in f32 and widens the rounded product,
and Inkling2AttnRes divided by rms where ggml scales by the reciprocal. The
gate_raw dust came from routing wqkv_gate and wo through the plain DotQ8_0
MatVec instead of the repack-gemm tier every other projection uses, and the
mix dust from a double logits dot, per-element softmax division and a
mul+add weighted sum where the oracle executes the NEON vec dot, the
ggml_v_expf soft_max with a reciprocal scale and a sequential-f32 fma
combine. After the fixes every chunk-1 il0 tap from attn_in through ffn_norm
is bitwise 0-mismatch against oracle abca69200; the remaining dust is
isolated to the MoE (1771/2304), named for the next wave with its candidate
sites. Two new fixture tests reproduce the oracle rows bitwise and run red
against the stashed old arithmetic (748 failed assertions).

Raw gate: raw[5] is exact for its full 128 tokens (first leg all-green);
raw[0] j=5 stays red through the still-dusted MoE near-tie.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
… SITU and NVFP4 expert dot to ggml

The il0 chunk-1 MoE stage diverged at the router logits: the F32
ffn_gate_inp weight ran through the double-accumulating scalar dot while
the oracle's F32 traits execute the NEON ggml_vec_dot_f32 branch. The
weight normalization divided once in double where ggml stages an f32
sum, an f32 scale_bias eps=1e-20 add and an f32 div; the SITU beta
scales divided where ggml multiplies by the reciprocal across two
rounded scales; and DotNvfp4Q8_0 transcribed the scalar fallback of
ggml_vec_dot_nvfp4_q8_0 while the pinned oracle binary executes the
NEON DOTPROD branch (two sdot chains, one vpaddq into four sumi lanes,
four fma lanes, pairwise reduce), which the il0 chunk-1 moe tap showed
as 1713/2304 @9.5e-7 after the router fix. All four are model-local
repairs in the inkling2 mirror.

The il0 chunk-1 tap is now bitwise end to end (ffn_norm through l_out,
including moe_logits/probs/sel/weights/situ/down/weighted/moe), and the
raw gate ladder moved from first-bad j=91/21/83/68 on four legs to all
eight probe tokens matching on five of six legs; raw[0]'s byte-identical
j=5 near-tie remains and is named (layers il>=1, decode regime, chunk2
beyond il0) in the wave-9 PROCESS record. DotNvfp4Q8_0 carries a
six-golden bitwise pin against the live libggml-cpu.so that fails 4/6
under the retired scalar arm.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…tive-bias dot; prove il>=1, chunk-2 and decode-1 bitwise

Wave 10 of the Inkling-2-Mini W1 lane. Tap instrumentation widened to all
layers on both sides; the bitwise-proven window now covers il0..il5 chunk-1
end-to-end, chunk-2 at every layer and position, and decode step 1; the
decode dispatch is pinned to flash_attn_ext_f16_one_chunk for every graph
the gate exercises (the >=512 split-kv regime is unexercised and recorded).

Two fixes, both model-local:

- The attention-sink softmax recurrence in Inkling2AttentionStep executed a
  fused fma; hex traces against the pinned oracle binary prove its sink site
  rounds unfused (mul-then-add) while the key-loop recurrence stays fused.
  The sink site is now unfused. Chunk-2 taps go from 108/3072 dust at il0
  to 0/ALL at every layer and position.

- The gathered relative-bias dot was a double-accumulating scalar sum while
  the oracle builds the table with ggml_mul_mat on F32 weights; it now runs
  Inkling2DotF32Vec and matches the oracle's gathered mask_row bitwise,
  pre- and post-F16.

The remaining red is named: the AttnRes bank mix for three or more states
(first dust at il6, 5e-7). Two mix hypotheses were tested and reverted
after the gate regressed two 8-match legs. The raw gate stays red at the
raw[0] j=5 near-tie (151663 vs 161721).

Hermetic suites 9/9 green; preflight --staged exit 0.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
… ggml vec_dot_f32

The AttnRes bank-mix weighted sum executes ggml_vec_dot_f32 over the n
states, and the executed binary contracts each 4-element group as fmul
then fadd with a <=3 explicit-fma remainder. A plain ascending fma chain
therefore validated bitwise at n<=2 while diverging at the first n=4
site (il12 ffn_mix 892/2304 ULP with bitwise states and probabilities —
hex-traced against the widened oracle mix taps at on11). Inkling2AttnRes
now gathers the state column and combines through Inkling2DotF32Vec,
which is bit-exact against the live libggml-cpu.so at n=1..40 (80000/80000
probe) and leaves n<=2 unchanged by construction. Prefill chunk1 and
chunk2 pass0 are now bitwise end-to-end at all 16 layers; the raw gate
ladder is byte-identical to wave 10 and the remaining divergence is named
as decode steps >= 2 (wave-10 proved only decode step 1). Adds the
measurement-only VT_INKLING2_MIX_TAPS knob (allowlisted) and a hermetic
pin whose mutation (reverting to the fma chain) is red.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…ec_dot_f32

The loop-control projections (loop_*_ctrl_down/gain/forget are F32 in the
GGUF) ran through the retired scalar double-accumulating Dot while the
oracle's mul_mat F32 traits execute the NEON ggml_vec_dot_f32 (ggml-cpu.c
219-224). The F32 arm of Inkling2MatVec now calls Inkling2DotF32Vec, the
wave-7-validated transcription. New hermetic pin "f32 MatVec dot
bit-matches ggml_vec_dot_f32" (8 control-shaped rows, discriminating guard
against the scalar arm; red under the scalar arm, green after). A new
env-gated measurement-only decode-tap probe captures decode steps 2..N.

Wave-12 bisect evidence (/tmp/ink2-w1-cap): oracle taps now cover decode
steps 1..9 (LLAMA_GRAPH_REUSE_DISABLE=1 defeats llama-context graph reuse,
llama-context.cpp:1835) and all 48 loop visits (il<=47); ours covered by
the new probe. Decode steps 1..5 and prefill pass0 (il0..il17) are bitwise
exact at every tap, including block pushes and bank/messages; the j>=5
divergence is real and lives in the loop-pass machinery: cycle1 ip6 attn_in
first diverges (0.456) with bitwise loop_msg/bank/bank_out inputs, growing
through cycles and the tail whose input is the last cycle's l_out. Gate
(bounded raw, knob 16): raw[0] first-bad j=5 got moved 151663->220, want
161721; other legs unchanged. Next mechanism: the control op arithmetic and
the attn_res_query row-count semantics (4/12-row tensors), not the dot tier.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…SS.md

Append-only lane record: decode steps 1..5 bitwise exact, loop-pass cycle1
control named as the remaining mechanism, f32 MatVec fix and gate
trajectory. Trailers on the preceding fix commit.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…rately

The oracle control() concatenates cur and message along dim 1 into
(n_embd, 2, tokens) and ggml_rms_norm then normalizes over ne00 = n_embd,
so each half carries its own rms (ggml-cpu/ops.cpp:4269-4289) before the
gate is reshaped to (2*n_embd, tokens) (inkling2.cpp:330-343). Our
Inkling2Control normalized the joint 2*dim row instead: a different op
that produced the wave-12 red of 0.456 at cycle1 ip6 attn_in despite
bitwise inputs, weights, and messages. Fixed to the per-half form with
ggml's scale arithmetic (double sum of f32-rounded squares, mean = float
(sum/dim), scale = 1/sqrtf(mean + eps), y = x*scale).

Also pinned the two wave-12 open questions from the actual GGUF:
attn_res_query is [2304] (nq=1) on SWA layers and [2304,3] (nq=3) on
full layers 5/11/17/23, so the caller's shape-based derivation is
correct; all loop ctrl weights are F32 with byte digests recorded
(blk.6.loop_q_ctrl_down sha e9dfda0c765bcd47). The caller pass
structure (passes, bank handoff, per-pass messages) matches
inkling2-loop.cpp:93-121.

Red/green: the retired loop.py joint-rms reference pin was replaced by
the ggml per-half form plus a discriminating pin; the pre-fix binary
fails 24 assertions (w13-red.log) and the fixed suite passes 23/23
(195810 assertions). Decode-tap capture ours-w13.bin vs on13 shows
cycle1 ip6 attn_in and cycle2 attn_in BITWISE 0/2304, l_out bitwise at
both cycles, and greedy tokens equal the full oracle golden
[152717,13,68014,32,13,161721,156021,68014,33,13]. Raw gate ladder
(knob prefill_ubatch=16, bounded): 5 of 6 raw legs now exact through
128 tokens including raw[0]; the sole remaining red is the Translate
'good morning' leg at first-bad j=70. Chat leg untouched (pre-existing
failure tracked separately). No shared vt:: op touched; no tolerance
tuning; no checker weakened.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
… repack seam

The Inkling2-Loop tail layers (20..23 of the UD-Q4_K_M artifact) store their
MoE expert weights in a different quant arm than the head layers: ffn_down_exps
is Q8_0 and ffn_gate_up_exps is Q5_K, where layers 0..19 are NVFP4. The oracle
runs mul_mat_id on those tensors through the repack-buffer tiers
(repack.cpp:5253 dispatch; gemv for one src1 row), so the vec_dot-tier dots our
MoE used carry 1e-6-class dust on every tail-layer expert projection. That dust
crossed a sampling near-tie at decode step j=70 of the raw "Translate 'good
morning'" leg, the last red leg of the six-raw-prompt gate.

This change routes Q8_0 expert weights through vt::cpu::QuantRepackMatmul, the
wave-4 bit-proven transcription of both executed repack tiers, via a lazy
per-layer repack cache keyed by (q8_raw pointer, expert). It is seam
consumption only; no shared vt:: op changes. The Q5_K gate/up repack-gemv
transcription is named in PROCESS.md as the next owed kernel and is not landed
here, so the France leg's 15-error near-tie flip recorded in the gate run
stands until it lands.

Evidence: mutant capture ours-w14b (j=70 got 152416) vs fixed captures
ours-w14c/ours-w14d (j=70 got 220, full oracle golden to step 75); bounded
gate run w14-gate2.log (raw Translate all-128 exact, 5 clean legs hold, France
regressed as described); hermetic suites green (ops 195810 assertions, loop
gguf, gguf, dequant, nvfp4, quant bits, registry, loader); preflight --staged
exit 0.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…nscribed repack+gemv tier

Wave 15 of the Inkling-2-Mini W1 lane. Layers 20-23 ffn_gate_up_exps are
Q5_K; the oracle (llama.cpp abca69200) runs mul_mat_id over them through
repack_q5_K_to_q5_K_8_bl(8) plus ggml_gemv_q5_K_8x8_q8_K, while our side
used the reference vec_dot tier whose 1-ULP dust flipped near-ties (wave
14: Translate fixed by the Q8_0 down arm, France regressed to 15 errors).

The wave-14 staged probe mismatched the live library because its
make_block packed only 48 scale bytes with the Q4_K high-bit scheme; the
pinned make_block_q5_Kx8 packs 96 bytes in two 48-byte halves. New
model-local TU inkling2_q5k_repack_gemv carries the repack, the 6-bit
scale decode and the gemv verbatim, compiled with the surgical per-file
+dotprod flag and gated on the shared HWCAP DotProd probe
(VT_CPU_INKLING2_Q5K_DOT, default auto). Inkling2Moe routes Q5_K gate/up
experts through a per-layer per-expert repack cache and one gemv over all
2*inter rows; our per-token MoE never reaches the M>3 gemm tier, so it is
recorded unexercised, not transcribed.

Bitwise vs the dlsym'd live libggml-cpu.so: gemv 2304/2304 on the staged
real blk.20 bytes, 775296/775296 across 8 shapes x 48 activations, repack
11057024/11057024 bytes against the oracle's own exported repacker; the
live symbol disassembles to the sdot/fmla tier this TU compiles to.
QuantizeRowQ8_K re-proven bitwise (339012/339012). Red-first: the staged
wave-14 probe mismatched 2304/2304 before this transcription. Mutation:
unfusing one accumulator fma turns the new pin red (5 assertions);
restored byte-for-byte.

Two hermetic pins join test_inkling2_loop_ops: the kernel bit-pin against
lib-captured words and the MoE reachability pin (one-hot down projection
isolates wt*situ(gate,up); red if the dispatch stops selecting the tier).
12 hermetic suites green; bounded raw gate (prefill_ubatch=16, timeout
3600, flock held, MemAvailable 200G) exits 0 with 799/799 assertions:
ALL 6 RAW LEGS ALL-128 EXACT, France's regression reversed. Chat mode not
rerun (pre-existing 55-vs-71 failure tracked by the coordinator). No
tolerance tuning, no checker weakened, no shared vt:: op touched.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
…ile the rebase onto main

The row's exact-token gate is GREEN and stays green after the rebase onto
origin/main 7b5a69d: a bounded raw rerun at the rebased HEAD under
flock/MemAvailable-precheck/timeout gives 6/6 raw legs all-128 exact vs
llama.cpp abca69200, doctest 799/799 assertions, exit 0. The spec gains
## Outcome (the measured gate, the falsified premises with their bitwise
evidence pointers, the rejected defaults) and a completion ## Now; the
chat-mode 55-vs-71 failure is recorded as PRE-EXISTING (reproduced
byte-identically on the pre-campaign stash baseline at f68f1ad47) and
coordinator-tracked, not chased; the Q5_K gemm tier and the flash
split-kv (>=512) decode regime are recorded UNEXERCISED; the arm is
aarch64-only per its DotProd/i8mm gating.

Rebase reconciliation: 44 commits replayed onto main, six
previously-applied ENG-CHUNKED-PREFILL duplicates dropped, the redundant
seam-cherry-pick repair commit skipped. On the shared
src/vt/cpu/cpu_quant_repack_arm.cpp, main does not carry the nearest-even
QuantizeRowQ8_0Runtime (its QuantizeRowQ8_0 in cpu_quant_act.cpp is
nearest-even but is not the repack path's quantizer), so this branch's
runtime quantizer is kept; with it, the fused vfmaq_f32 Q8_0 gemm
accumulation replaces main's recorded vmlaq deviation — cross-tier byte
identity was a wrong invariant, superseded by per-tier oracle equality.
tests/CMakeLists.txt takes the union of main's test_quant_repack_kq_repack
block and this lane's tap-gated registrations, dropping the duplicate
ungated test_ops_quant_repack target the union left. docs/ENVIRONMENT.md
keeps both env rows. check-agent-record rot 0; preflight --staged exit 0.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]
The non-DotProd scalar fallback of GemvQ5K8x8Q8K voided k/s/vx/vy but
not nc, failing -Werror=unused-parameter on the x86 and newest-gcc
lanes. Syntax-verified clean under -Wall -Wextra -Werror on x86.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
…pack target

The branch removed the duplicate ungated test_ops_quant_repack target
from tests/CMakeLists.txt (the gated test_quant_repack_kq_repack
replaces it), but the arm64-full lane still named the removed target
in its build list and both VT_CPU_QUANT_REPACK env-var invocations,
failing with 'No rule to make target'. Point all three references at
the gated replacement. The lane's ISA probes fail on this runner
independently (the CI-MAIN-CTEST-RESIDUE known-red); this fix only
aligns the workflow with the tree's target reality.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [maki]
…acts per the pinned build

The kolibri lane's half of the contracted flash-order arm that did not ride
with the S-recurrence fix: ggml's per-key V update (ops.cpp:9024-9032 @
5f4d22289) calls ggml_vec_mad_f16_f32, which on NEON is a WIDENED FUSED mad
(vec.h:467-474, vfmaq_f32 lanes) — the V product joins the VKQ accumulator
with ONE rounding. This tree builds -ffp-contract=off, so the arm's
acc[e] += KvElem(...) * vs two-rounded, 1-ULP VKQ differences that compound
through the 1/S normalization. Both the kernel
(src/vt/cpu/cpu_paged_attn.cpp) and the test reference now write
std::fma(KvElem(...), vs, acc), the kolibri-proven form.

Red-first: contracting the reference turned all 4 arm-vs-ref memcmp cases
RED against the uncontracted kernel; the kernel fix returned GREEN. A new
bit-witness case pins both roundings at a traced triple (v bfe82651, vs
3f5bc584, acc bf5770aa -> c019821d contracted, c019821c under two
roundings). Mutation: the kernel fma reverted to mul-add -> 4 RunCase
memcmp failures RED; byte-for-byte restore (verified by cmp) -> GREEN, and
all sibling paged-attention suites stay green (test_ops_paged_attn,
_dtype, _neon, _route, _sharedk_wmma_p1). Preflight --staged exit 0.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:zai/glm-5.3-flash [task]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant