Skip to content

Kimi K3: description, fixture, tokenizer, the card's KDA / gated MLA / MoE layers on common owners, placement inputs (the body follows) - #1178

Merged
midagedev merged 26 commits into
mainfrom
kimilift
Nov 5, 2026
Merged

midagedev merged 26 commits into
mainfrom
kimilift

Conversation

@midagedev

@midagedev midagedev commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Kimi K3 (kimi-k3, 2.8T / 104B active: 69 KDA + 24 gated no-RoPE MLA layers, 896 experts top 16 + 2 shared, latent MoE, situ, AttnRes 뱅크) 의 설명·픽스처·토크나이저·카드 레이어(KDA, 게이트드 MLA, MoE 블록)·플레이스먼트 입력 — 모두 공통 owner 위에서, 새 커널은 라우터 인스턴스와 슬롯 합 뿐. 몸체(decode step, e2e)는 다음 PR.

What and why

Kimi K3 support, the first half: everything below the chain. AGENTS.md "Common code first" drove each piece — what raon1 (KDA + gated latent + situ MoE) and nemotron_h_moe (latent MoE) already did is now a common owner, and kimi_k3 holds only what an architecture fact forces.

  • Description and fixture (crates/gguf/src/arch/kimi_k3.rs, crates/model/src/arch/kimi_k3/{hparams,names,roles,spec,fixture,place}.rs): per-layer head_count_kv 0 = KDA / 1 = MLA, layer 0 dense (dense_lead_of), the latent MoE (ffn_routed_down/norm/up, Moe.sum_norm), the 2-shared gated stack, situ (β 4, β₂ 25), Residual::AttnRes{block} every 12th layer, tokenizer.ggml.pre = kimi-k2. The fixture writer cuts a 152 MB file from the real file's layers [0, 46, 83, 84] (KDA dense; KDA routed IQ2_XXS/IQ1_S; MLA routed; KDA routed all IQ1_S) at hidden 512 / latent 256 / 8 experts top 2 / shared width 512 / attn_res block 2; gate-kimi-k3-meta pins the header, the tensors by role and type (kimi_k3_tensors.tsv, 2573 rows) and the box plan's bytes (KDA store 7,913,476 B a layer, latent row 1,152 B a position, experts by type; the planner on A6000 + 3090 at ctx 32768: 3,313 card experts at cut 70, 1,394 NVMe picks a token, 516.5 GB NVMe).
  • Tokenizer (Pre::KimiK2): our ids equal llama-tokenize on every case (pins kimik2-ids.tsv, written by kimik2-oracle.sh), re-checked on shard 1 of the real file; gate-kimi-k3-tokenizer.
  • KDA layer: runs on the common crates/gpu/src/linear/mixer_kda.rs with K3's rule as launch args (Sigmoid{lower_bound: -5}, beta_scale 1, write_gate false, the full-rank ssm_g into z); no new kernel; gate-gpu-kimik3-kda against llama.cpp's build_kda_layer in f64 at 2 and 96 heads.
  • Gated MLA: raon1's mla.rs lifted to crates/gpu/src/latent_gated.rs (attend, attend_rows), both families call it; no new kernel; gate-gpu-kimik3-mla against build_mla_layer in f64 (2 and 96 heads, nope 128, 64 unrotated rope lanes, 512 latent, value 128; decode at 1..300 keys, 8 rows = 8 steps).
  • MoE block: raon1's ffn.rs lifted to crates/gpu/src/arch/routed_ffn.rs with the latent pair and the routed-sum norm as optional stages (Routed.latent, Routed.sum_norm, None for the families without them) and the router instance as a type parameter; rda's row kit to arch/rows_kit.rs; kimi_k3/moe.rs holds the load, width checks and refusals. New PTX entries only: sigmoid_896_16_router(_pick), sigmoid_8_2_router(_pick), ds41_ffn_card_acc_2, _16; just ptx-compare c210226c6 generate_ds41 rc 0 added-only (537 base entries unchanged); gate-ptx-spill red on exactly the six before the pins. gate-gpu-kimik3-moe: 22 clauses on the fixture's three routed layers and one real-width layer against the host f64 reference, band rel L2 5e-2 (derived: q8_1 activation rounding ~0.6 % a site, worst sum 1.5 %, ×3; measured 1.6e-2..2.0e-2, separations ≥ 11 bands).
  • Lifts (delta_mla.rs for the Mla/Situ readers and the generic layer kinds, latent_gated.rs the attention core, arch/gated_mla.rs the gated MLA layer driver (sites, buffers, step, rows; raon1 keeps its wide-rows path), routed_ffn.rs, rows_kit.rs): raon1's bits unchanged (ptx-scan identical on its bins; gate-gpu-raon1-attn and the raon1 meta/tokenizer gates green in the batch; the gated_mla lift: ptx-compare 5fcf11e1c identical 544 = 544, gate-gpu-lib 520 + 10, kimik3-mla 66 clauses, raon1-attn 16, kimik3-e2e PASSED, one mutant red).
  • Reference sets (crates/refset/src/arch/kimi_k3/): the families lcpp-kimi-k3 (the real file) and fx-lcpp-kimi-k3 (the fixture), dumped by mainline llama.cpp 78feec062's own kimi-k3 graph (tools/ref/kimi-k3-dump.sh, just build-k3-lcpp / dump-ref-kimi-k3, cards for both dumps), four prompts; the vendor tree opens our fixture with no refusal (arch kimi-k3, n_layer 4, n_head_kv [0,0,1,0]), the fixture writer's strongest check. Six contract tests, each red under a mutation of the family row; just gate-refset 362 passed with the sets in place.
  • The decode step (crates/gpu/src/arch/kimi_k3/{body,kda,state}.rs, round kimik3body): GpuModel<Body>::open walks the description's per-layer kinds over the common owners above; the one kernel a K3 fact forces is the AttnRes bank mix (crates/gpu/src/attn_res.rs, entry attn_res_mix: gate-ptx-spill red on exactly it before the pin, just ptx-compare afcc13668 generate_ds41 rc 0 added-only, the per-arch tables carry the derived 0/0 row until a scan on that arch; unsafe ratchet 3021 → 3036 blocks, PIN(2026-11-06)). gate-gpu-kimik3-e2e (fixture tier, the fx-lcpp-kimi-k3 sets a..d): the free chain's layers 0..2 within [0.05, 0.08, 0.2] of the vendor's (measured 3.0e-2, 5.1e-2, 1.35e-1), every mixer and ffn block alone on the vendor's rows within 4e-2 (measured ≤ 2.8e-2) with the vendor's picks on all 12 routed blocks, the logits row within 1.0, the mix vs the host f64 within 1e-5 (3.5e-7), steps deterministic, eager = replay; bands derived in the bin's doc. Mutants: the mix dropped, the routed norm dropped, layer 1 opened as MLA — each red. Known gap: the teacher-forced top-1 clause catches none of the three (3–5 of 32 positions above MARGIN_FLOOR; the vendor's CPU q8_K 256 and our q8_1 128 activation blocks differ by 1.4–2.8 % a branch, amplified by the free chain) — the block and layer clauses carry correctness; in the triage.
  • Registrations: tools/families.tsv (F, other), gate-class.tsv, model-tokens.tsv, model-tax.tsv (five PIN(2026-11-05) rows for the enum arms the registry does not own yet), fixture-dirs.tsv, tools/ref/models/kimi-k3.sh.

Not in this PR: the decode step and chain (kimi_k3/{body,state}.rs, the AttnRes mix, the head), the prompt rows, the Program wiring, the real-file bring-up — rounds in flight on top of this branch. Until the body lands, PlanInputs::read refuses the family by name with its 348 coverage items in 6 rows (pinned).

Release notes: none yet (the family does not run); the next PR's.

Code shape

  • No second copy. One owner each for the gated latent attention, the routed ffn, the row kit, the delta/MLA readers; raon1 and K3 call them.
  • Model code holds only architecture facts. kimi_k3/ holds shapes, names, the per-layer kind rule, the fixture cut and the load-time refusals; no family branch in a common owner.
  • Dead code is gone. raon1/ffn.rs and the rda row kit are moves, not copies.
  • No silent failure. A layer kind, a width, a count no instance is built for, a tier card: each refused by name; PlanInputs::read refuses the unfinished family.
  • Comments state what is true now. tools/check-comments.sh rc 0.
  • No relaxed gate. No band moved; new pins carry PIN(2026-11-05) (unsafe ratchet 3017 → 3021, ptx-shapes rows, model-tax rows); mutants per gate (sum-norm, situ-beta, select-bias, up-first; KDA state halved, latent row 512; the MLA and KDA gates' in-gate separations).
  • just mac-static main green on the merged tree (the lease self-test's 4 FAILs were a load flake beside a parallel check: green alone, lease.sh untouched).

Duplication found or removed: raon1/wide.rs refuses a latent or sum-normed block by name rather than growing the arithmetic (the prompt-rows round's); the byte-read helper noted in #1174 still has its four copies.

What I ran

Box (RTX A6000 + RTX 3090, driver 580), fixture tier. Rounds (Sonnet 5.5: kimik3, kimik3mla, kimik3kda, kimitok, kimilift, kimik3moe, kimik3place), each with FAIL-first and mutants as above. Lead's union batch on 1084d1f, tools/gate-batch.sh --ledger --tier fixture --no-canary --list <just affected main> (224 of 251 gates selected; narrow does not shrink it, the registration files have no gate-paths row): DONE total=248 red=1 tier=fixture wall=2711s deferred=290. Body merge (5fcf11e, just ptx-compare dd9759270 generate_ds41 added-only): gate-gpu-kimik3-e2e PASSED, gate-ptx-spill rc 0, gate-gpu-gates-lib rc 0, gate-refset 362 passed (real tier), gate-gpu-lib 519 of 520 — hw_a_held_card_leaves_the_room_its_open_reads read a negative room while three other rounds' gates shared the card (contention, not this change; rerun in the release batch). The one red of the union batch, gate-models (the biased-sigmoid router-row test did not name K3's two rows), fixed in b5cb4a8 and rerun green (47 + 3 passed).

Hardware

Box: AMD 64-core, 256 GB, RTX A6000 48 GB + RTX 3090 24 GB.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5

midagedev and others added 16 commits November 5, 2026 20:47
…on owner as it is; gate_kimi_k3_mla pins it (66 clauses, band 4e-3) and MlaDims::check_heads refuses per-head planes of another layer by name

Round kimik3mla (Sonnet 5.5): the spec named gpu-deepseek41's attn.rs as the owner to extend; the round read both and found
the owner is `crates/gpu/src/arch/raon1/mla.rs` (576-wide [rope|latent] cache, absorb, rope gather, latent flash, v_b,
`OutGate::Proj`), which takes K3's 96 × (128 nope + 64 rope) with the output gate unchanged: no new kernel entry
(`ptx-compare main generate_ds41`: 537 = 537, identical), `gate-ptx-spill` unchanged. The gate's f64 reference follows
llama.cpp's kimi-k3 graph; decode at 2 and 96 heads over 1, 7, 64, 65, 300 keys and prefill 8 rows within 8e-4 of the
reference, prefill bit-equal to the decode steps at the same cache height; mutants gate-dropped (46 red), rope-lanes-dropped
(38 red: the source keeps the lanes), causal-off (20 red). `check_heads` found by FAIL-first: two refusal clauses ran without
a word before it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
…reader with KDA/MLA layer kinds, latent MoE, situ, AttnRes banks), its synthetic fixture and gate-kimi-k3-meta; the models crate gains KdaFullGate, Moe.sum_norm and Residual::AttnRes

Round kimik3 (Sonnet 5.5). Layer kinds come from the per-layer `head_count_kv` (0 KDA, 1 MLA, anything else refused by
name) and are checked against the tensor set; layer 0 dense, 1..92 MoE; the type table is the union of the 14 shards'
HF listings (routed IQ1_S / IQ2_XXS, Q6_K projections, Q8_0 ssm_f_b and attn_k_b), a tensor of another type refused by
name. The fixture (4 layers from the real 0, 46, 83, 84: KDA dense, KDA routed, MLA routed, KDA routed; hidden 512,
latent 256, KDA 2 × 128 with a 128 × 128 state, MLA q_lora 256 / kv_lora 512 / nope 128 / pe 64, 8 experts of ff 256,
2 shared, attn_res block 2, vocab 163840; 152,373,440 B) is the kernel rounds' contract. gate-kimi-k3-meta on the box:
lib 15 + meta 3 passed; eleven mutants under .mutants/kimik3-* each red; FAIL-first reds on the type table and the
AttnRes need row. The real file's shard 1 (no tensors) prints its 61 kvs and 2573-tensor split header; the full set
opens once every shard has landed. Found and left: `tokenizer.ggml.pre = kimi-k2` is not in Pre::NAMES (round kimitok).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
# Conflicts:
#	tools/gate-class.tsv
… rule as launch arguments (sigmoid gate bounded at -5, beta scale 1, no write gate, the full-rank ssm_g straight into z); KdaDims::of_file refuses another file's geometry by name; gate_kimi_k3_kda pins it (17 clauses)

Round kimik3kda (Sonnet 5.5). The spec named gpu-glm5next's kda.rs; the common launch order already lives in
`crates/gpu/src/linear/mixer_kda.rs` (GLM, Solar and Raon run it), so K3's differences are arguments and the head count a
`LinearShape` dimension: no new kernel entry (`ptx-compare 41be838`: gate_kquant 464 = 464, bloomery-serve 575 = 575,
identical; the new bin's entries all within gate_kquant's). HEAD is a compile-time 128, which K3 shares. The gate's f64
reference follows llama.cpp `build_kda_layer` (69ee2ecc0; per-key decay as ik and fla): decode at 2 × 128 and 96 × 128,
8 steps, and an 8-row prefill bit-equal to the 8 steps, all within 8.2e-7 of a derived 1e-5 band; nine refusals by name;
mutants decay-sign, dt-dropped, conv-v-only (6 red each), beta-row0 (the prefill clauses red), headdim-unchecked (the
refusal clauses red).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
…contraction tail, digits in threes from the front, the punctuation tail), pinned id for id against llama-tokenize on Kimi K3's vocabulary; the raon and kimi-k2 pins share one comparator

Round kimitok (Sonnet 5.5). `Pre::KimiK2` written from llama.cpp's `unicode_regex_split_custom_kimi_k2` (mainline
78feec062, build 11998): Han is a word of its own, no case boundary, marks are not letters, the punctuation tail takes no
slash; against raon, no NFC and no joining of letter runs by spaces. The pin `kimik2-ids.tsv` holds 129 rows (cases.txt
42 + cases-kimik2.txt 87) in both parse modes from `crates/tokenizer/tools/kimik2-oracle.sh`, run on a vocabulary-only
copy of the K3 file's shard 1 (`vocab-only-gguf.py`; llama-tokenize opens a split set whole and the set is still
downloading) — the same oracle on shard 1 itself is owed once the set is complete. FAIL-first: both tests
`UnsupportedPre("kimi-k2")` before the arm; after, `kimik2: 129 cases, 0 differ`, the raon gate `57 cases, 0 differ`
through the shared comparator; mutants contractions (10 rows) and digits (30 rows) red.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
…/gpu/src/latent_gated.rs (the gated latent attention's dims, kernels, buffers, attend and attend_rows) and crates/model/src/arch/delta_mla.rs (the Mla and Situ readers, dense_lead_of, the generic kinds); kda::gate reads the bound for both; the stray fixture.rs.orig dropped

Round kimilift (Sonnet 5.5), a move class: canon-check c00e15b --worktree: 4 bins, 1963 entries, 1963 identical. The
MLA driver (step, rows, rows_wide, MlaSites, MlaBufs) stays in raon1/mla.rs because it depends on raon1's rda, wide and
state; MlaKernels::load takes the gather rows as an argument (raon1 WIDE_ROWS, the K3 gate PASS_ROWS). Family
differences stay with the family, no union: raon1 alone checks attention.value_length against kv_lora (two lines after
the common read); raon1 keeps hc, latent_eps, decay_rank, K3 keeps latent and attn_res_block. tools/owners.tsv names the
new file under attn_latent_mla. Gates on the box: raon1-meta, kimi-k3-meta, arch-registry, model lib 672, raon1-attn 16
clauses, kimik3-mla 66 clauses, ptx-spill, each green; check-recipes, check-comments, fmt, mac-check rc 0.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
# Conflicts:
#	justfile
#	tools/gate-class.tsv
# Conflicts:
#	justfile
…N rows for the family's common-code lines, the tests read the architecture key through gguf::GENERAL_ARCHITECTURE, three clippy hits in the new gate and test

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
…he common arch/routed_ffn.rs (latent down/up pair and the routed sum's norm as optional stages, the router instance as a type parameter), rda's row kit to arch/rows_kit.rs; K3's moe.rs holds the load, the width checks and the refusals; card sums at 2 and 16 slots; gate-gpu-kimik3-moe

Round kimik3moe (Sonnet 5.5). The K3 block = the common routed block with two stages the other families leave None
(`Routed.latent`, `Routed.sum_norm`) and two shared experts as one gated stack; no family branch. New PTX entries, pinned
after gate-ptx-spill was red on exactly them: ds41_ffn_card_acc_2, ds41_ffn_card_acc_16, sigmoid_896_16_router(_pick),
sigmoid_8_2_router(_pick); `just ptx-compare c210226 generate_ds41 --features gpu,deepseek41` rc 0 added-only (537 base
entries unchanged). gate-gpu-kimik3-moe: PASS 22 clauses on the fixture's f1, f2, f3 and one real-width layer against the
host f64 reference, band rel L2 5e-2 (derived: q8_1 activation rounding ~0.6 % a site, worst sum 1.5 %, ×3; measured
1.59e-2..1.98e-2, separations ≥ 11 bands); picks equal to the reference, weights within 1.24e-7; 8 prompt rows bit-equal
to 8 steps. Mutants sum-norm (f1 decode 5.8e-1 FAIL), situ-beta (refused at load), select-bias (f2 and real-width picks
differ, FAIL), up-first (shape refusal) each red. gate-gpu-lib rc 0; check-recipes, check-comments, check-unsafe (ratchet
3017 → 3021, PIN(2026-11-05)), check-ptx-names, check-model-tax green on the Mac. llama.cpp kimi-k3.cpp read at cc78da97c.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
# Conflicts:
#	crates/gpu-gates/Cargo.toml
#	justfile
#	tools/families.tsv
#	tools/gate-class.tsv
#	tools/model-tax.tsv
… the common hybrid owner (the KDA store, the latent row and the expert bytes by type from the description), the box plan pinned in kimi_k3_meta, the coverage rows read() refuses until a body runs the family

Round kimik3place (Sonnet 5.5). `describe` goes through `spec::read`, so the plan and the registry share one description;
`read` refuses the 348 coverage items in 6 rows (a layer program, a tool-call parser, AttnRes ×93, the full-width KDA
gate ×69, the 896/16 biased sigmoid router ×92, the routed-sum norm ×92), pinned to go red when the body lands. Per-layer
bytes: KDA 7,913,476 B (state 96·128·128·4 + conv ring 11×36,864×4 + stamp), latent 1,152 B a position, experts
6,451,200 / 7,827,456 / 7,139,328 B by type; the file 594,033,825,152 B, routed 545,349,697,536 B. The planner on the
box (A6000 + 3090 as stage cards, ctx 32768, 1 slot): card experts 3,313 at cut 70 (predicted 3,307), host 6.77 GB,
NVMe 516.5 GB, 1,394 NVMe picks a token (predicted 1,395), arena 116.2 GB at a 128 GiB room (the prediction counted the
OS reserve twice). Mutants: the KDA state halved (lib 99,332 ≠ 164,868; 70 meta pins), the latent row at 512 (lib
1,024 ≠ 1,152; 25 pins) each red; `just gate-kimi-k3-meta` rc 0 (lib 20, meta 4).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
@midagedev midagedev added the needs-gpu Changes code a card must check, and carries no gate run on a card label Nov 5, 2026
@github-actions github-actions Bot added gpu The card engine: crates/gpu*, crates/app host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja placement Placement planning: crates/placement tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Nov 5, 2026
midagedev and others added 8 commits November 6, 2026 01:00
… fx-lcpp-kimi-k3 (the fixture), dumped by mainline llama.cpp 78feec062's own kimi-k3 graph (tools/ref/kimi-k3-dump.sh, just build-k3-lcpp / build-ref-kimi-k3 / dump-ref-kimi-k3), four prompts, the cards for both dumps

Round kimik3ref (Sonnet 5.5). Mainline llama.cpp 78feec062 (build 11998, CPU, no patch; ik has no K3 graph, unsloth's PR
is closed) is the oracle and the public baseline at once; it opens the fixture with no refusal (arch kimi-k3, n_layer 4,
n_head_kv [0,0,1,0], 8 experts top 2) — the fixture writer's strongest check. Sets in $BLOOMERY_DATA: ref_kimik3_{a,b,c,d}
(2142/922/922/922 tensors, 2.6 GB/696 MB/726 MB/79 MB) and fx_ref_kimik3_{a,b,c,d} (84/38/38/38), each with the trailer;
bank layers tap prefix_sum_attn (no kda_out/mla_out there). Our bloomery-tokenize ids equal llama-tokenize on all four
prompts. The real dump's wall 719.8 s against the card's 730..2160 (below the band: the greedy term, 1.2 s a step vs 2–8
derived; the sets are taken and the next card lowers the band). Six contract tests red under each mutation of the
family row (build, arch, identity, trailer, …), 6 passed restored; just gate-refset and refset-check green.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
# Conflicts:
#	justfile
#	tools/families.tsv
…ugh mixer_kda, gated MLA through latent_gated, the common routed block, the dense lead, the AttnRes bank mix every 12th layer, the common head), the state book, one new kernel attn_res_mix; gate-gpu-kimik3-e2e against the fixture's vendor sets

Round kimik3body (Sonnet 5.5). `GpuModel<Body>::open` (crates/gpu/src/arch/kimi_k3/{body,kda,state}.rs) walks the
description's per-layer kinds; the only kernel a K3 fact forces is the AttnRes mix (crates/gpu/src/attn_res.rs, entry
attn_res_mix: gate-ptx-spill red on exactly it before the pin, `just ptx-compare afcc136 generate_ds41` rc 0 added-only,
543 base entries unchanged; the per-arch tables carry the derived 0/0 row until a scan on that arch). gate-gpu-kimik3-e2e
(fixture tier, the fx-lcpp-kimi-k3 sets a,b,c,d): FAIL-first red (`the decode step is not written yet`); PASSED — the free
chain's layers 0..2 within [0.05, 0.08, 0.2] of the vendor's (measured 3.0e-2, 5.1e-2, 1.35e-1), every mixer and ffn block
alone on the vendor's rows within 4e-2 (measured ≤ 2.8e-2) with the vendor's picks on all 12 routed blocks, the logits row
within 1.0, the mix kernel vs the host f64 within 1e-5 (3.5e-7), steps deterministic, eager = replay; every band
PIN(2026-11-06) with its derivation in the bin's doc. Mutants: the mix dropped (layers 1-2 0.24-1.4, logits 1.27-1.44: red),
the routed norm dropped (forced ffn 0.46-0.58: red), layer 1 opened as MLA (refused by name: red). Known gap: the
teacher-forced top-1 clause catches none of the three (3-5 positions of 32 above MARGIN_FLOOR, the vendor's CPU q8_K 256
and our q8_1 128 activation blocks differ by 1.4-2.8 % a branch, amplified by the free chain's gain ~10 at set a's layer 3);
the lead's call, noted in the triage. Lift candidates (identical blocks beside raon1's, ~50 lines, and raon1::mla's sites
used from kimi_k3): listed in the round report, not moved.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
…_len) lifted from raon1/mla.rs to the common arch/gated_mla.rs; raon1 keeps its wide-rows path and tests; kimi_k3 stops using raon1's module (check-arch rule 1 was red)

Round kimik3mlalift (Sonnet 5.5). A move: `just ptx-compare 5fcf11e generate_ds41` identical (544 = 544, nothing added,
removed or changed); check-arch ok, check-comments ok, mac-check and mac-lint rc 0. The cut per raon1 dependency: the row
kit from arch/rows_kit; PASS_ROWS from crate::linear (raon1/state.rs's is its alias); tensor names from the common
model::arch::names (both families re-export the same ten); rows_wide stays in raon1 (bound to its WideKit's eight ops).
Gates on the box: gate-gpu-lib 520 + 10 passed, gate-gpu-kimik3-mla 66 clauses, gate-gpu-raon1-attn 16 clauses,
gate-gpu-kimik3-e2e PASSED on the four sets. Mutant (q_b fed the unnormed q_a): hw_mla_rows_are_steps FAILED and the
e2e gate's forced_mixers clause red (4.07e-2..8.4e-2 over 4e-2); reverted, md5 equal.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X1hsQfyQxXKXsQ6LVTcsx5
@midagedev
midagedev merged commit 1072f00 into main Nov 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu The card engine: crates/gpu*, crates/app host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja needs-gpu Changes code a card must check, and carries no gate run on a card placement Placement planning: crates/placement tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant