Repository navigation
Inkling 2 Mini: refuse mismatched head widths and block splits at load, out-of-vocabulary ids and expired token handles at serve - #4990
Conversation
… widths the attention kernels do not run, before loading Moves the fixed kernel widths (head_dim 128, d_rel 16) and the mixes' eight finished-block cap into config.zig, where parse refuses a checkpoint that names any other value; kernels.zig, ops.zig and the Metal attention plan read the same constants.
… past read() masked handle % ring and returned whatever newer token sat in that slot once the ring wrapped; an expired handle now fails with InvalidInklingTokenHandle like a future one.
…launch A corrupt or off-checkpoint id used to index the embedding table out of bounds; the forward now fails with InvalidToken in the same host-side loop that already casts the ids.
|
I test-merged I then applied #4724 ( Igor Lessio - AIFLOW LABS |
What this changes
Inkling 2 Mini's config and serving now refuse three bad states by name instead of reaching device work: a
config.jsonwhosehead_dim,swa_head_dimord_relthe attention kernels do not run, or whosen_layers_per_attn_res_blocksplits the layers into more than the residual mixes' eight finished blocks; a served token id at or past the vocabulary, refused inloop_engine.forwardbefore any launch rather than reading the embedding table out of bounds; and a Metal token handle the 4,096-draw ring has wrapped past, refused rather than returning whichever newer token sits in its slot.main94e0f2dc2.atc overlap --json(run 2026-11-25, fork worktree): 2 upstream overlaps, both onCHANGELOG.md(app: control vector picker and strength in Engine advanced #1951, qwen27: serve the 27B pair, refuse what a pair cannot keep, and die with the peer #1434 — Unreleased list, merges by section); local-worktree overlaps are this fork's agent swarm and unactionable from here. Incomplete scan,pullFilesUnavailable.What is deliberately not here
The fork work this was audited against also carried, and this PR omits:
mini_*CUDA engine from the closed inkling2: Inkling 2 Mini served on CUDA at one rank (H2 + C4), stacked on #4364 and #4365 #4441 — upstream merged Inkling 2 Mini on CUDA and Metal #4387's engine instead; these gates apply to that engine.Lanebackend redesign (one CUDA stream and sequence state a--parallellane) — Inkling 2 Mini on CUDA: #4387's engine loads the checkpoint, answers correctly (64/64 teacher-forced), serves --parallel streams, and resumes prompt-cache states exactly #4640's slot-per-stream model landed inside Inkling 2 Mini on CUDA and Metal #4387 and superseded it.stream_bytesaccounting — already on main via Inkling 2 Mini on CUDA and Metal #4387/Inkling 2 Mini on CUDA: #4387's engine loads the checkpoint, answers correctly (64/64 teacher-forced), serves --parallel streams, and resumes prompt-cache states exactly #4640.loop.cu— main's engine runsloop_math.cu, already under contract; Inkling-2-Mini: Add loop message and gate kernels #4746 addsloop.cuseparately.TF_INKLING2_TRUNK=mxfp8load-time rounding lever and its GB10 receipts — a benchmark A/B tool, not serving behavior.Checks on this head
8f85e2f4a293704b421433326e59993a8e559ddb(the checks below were recorded on91b5e21d4874f1f9de503860d327e56b12c4ba15; the final commit changes only the Inkling 2 Mini: refuse mismatched head widths and block splits at load, out-of-vocabulary ids and expired token handles at serve #4990 entry inCHANGELOG.md).python3 tools/zig/lean_check.py: 165 on the base, 165 on this head, 0 new findings.zig build test-inkling2-host: pass (adds the config refusal table entry).zig build test-inkling2-cuda-host: pass (adds the vocabulary refusal test;stream_bytesand registration tests unaffected).zig fmt --checkon the touched files andgit diff --check: clean.zig build test test-goldenon this head: 17,473 pass, 5 fail, 131 skip. The five failures are outside this diff and reproduce on the base on this machine:net.test.stage(this network answersno-such-host.invalidlookups),benchmark_server_log_test(a 4 s wall-clock bound under a loaded shared GPU),info.test(Qwen3.8 start pricing),compile test safe native(qwen27bf16_topkmodule wiring on main) andcompile test fast native(6std.memerrors on main).test-inkling2-metal-hostand device checks — this host's libturbojpeg differs from the pinned 3.1.4.1 and the step fails the same on the base; no NVIDIA GPU on this machine, so no CUDA device run.Receipt
n/a for speed: every change is a refusal added before work the engine already did, or a refusal where a wrong answer was returned. No kernel, arithmetic, scheduling or admission line changes, so there is no faster or slower path to measure; a served checkpoint's admitted tokens are unchanged.
metal/backend.zig'sread; the CUDA side reads its token ids only insideloop_backend, which feedsforward.config.jsonadmission, before weights load; the vocabulary refusal fires per forward.Checklist
No visible change: nothing this PR changes shows on screen.
How to check
94e0f2dc274f1cbd63bde7cc343e47babb87cff38f85e2f4a293704b421433326e59993a8e559ddbTest results:
zig build test-inkling2-hostat91b5e21d4874(older head): 1 passed, 0 failed, 0 skippedzig build test-inkling2-cuda-hostat91b5e21d4874(older head): 1 passed, 0 failed, 0 skippedzig build test test-goldenat91b5e21d4874(older head): 17473 passed, 5 failed, 131 skipped