Repository navigation
Inkling 2: drafting for two requests, confidence-sized verifies (third follow-up to #401) - #408
Conversation
q, k, v, the relative-bias and gate projections, the sinks and the dynamic convs' taps ran as six to eight GEMV launches a visit, each small (24 to 3,072 outputs over K = 2,304). inkling2_proj_gemv runs them as one: each segment of a per-visit device table (written once the shared buffers attach, one a row count up to 8) is one projection's input rows, weight and output, and every output row is the chain dense_gemv_bf16_batchm computes for it (the common body now takes its block index). A visit with a quantized projection (Spark weights) keeps one launch each. Observed on one GB10, plain Strict decode (no drafter), saver size, greedy text and the six-prompt concurrency hashes identical to engine d1b138e: C1 code/prose 35.84/35.87 -> 36.37/36.37 tok/s (server rate, 3 runs), aggregate C2 51-53 -> 52-55, C4 79-80 -> 80-82, C8 115-118 -> 118-120 (2 rounds of 2 runs). Co-Authored-By: Claude Opus 5.5 <[email protected]>
`--tool-guard stream` screens the same calls as `on`, at the same point (each call's end, and the aggregate size bound as bytes arrive), but sends a call's header and arguments as they are written instead of holding them until the call passes. A call it blocks, or one the response cuts off, ends the response `content_filter` (not `tool_calls`) with STREAMED_REFUSAL, which says part of the call streamed and that it must not be run. Poolside v1 calls stay held: its detector buffers them anyway. `off` and `on` are unchanged, and `off` stays the default. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`pc_plan_branch` returned early for a model with no SSM layers, so `ATLAS_GLM_PC_BRANCH` never planted a checkpoint for Inkling 2, whose prefix hits resume from its short-conv state on the same snapshots. Gate on `snapshot_prefix_state()` instead, the gate the prefix lookup already uses (identical for SSM models). For a client that rebuilds its last few messages every turn (a voice rig: system, history, then three trailing user blocks re-rendered each turn), every user turn diverged ~500-700 tokens before the previous prompt's end and restored from the cold prefill's chunk boundary, replaying a growing 4.1-5.1K tokens. With the switch on (min 512), the first such turn plants a checkpoint at the divergence and later turns restore there. Observed, single run, one GB10, Strict, saver flags (prefix caching, 64 slots, chunk 4096), 16.4-17.4K-token prompts, 8 turns: user-turn TTFT 1.33-1.73 s -> 0.61-0.82 s (the planting turn 1.33 -> 1.49 s); follow-ups unchanged at 0.29-0.32 s. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`tool_choice` required (or a named function) constrains the output to the Hermes grammar, so the model writes `<tool_call>` text with no Inkling block header. The rewrite passed that through without the think end, so a streamed request with thinking on read the call as reasoning and the in-think leak guard cut the response (finish `length`, guard `in_think_tool_leak`); effort none and the blocking path were unaffected. Text between blocks now closes the reasoning first, as a text block does. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Inkling 2 Mini takes images; the target served text only. This adds its tower (`model.visual.*`, transformers `Inkling2VisionModel`) as a third `VisionTower`: - config: `vision_config` (`inkling2_vision`) parses to a `VisionConfig` with the new `is_inkling2` marker; the image token is the processor's `<|unused_200054|>` (200054), which `config.json` does not carry. - preprocessing (`vision_preprocess/inkling2.rs`): no resize. The image is padded to 40x40 pixel tiles (padding -1 on the 0-255 scale, alpha on the reference checkerboard), one token per tile, patches emitted tile by tile. An image of more tiles than the encoder holds is scaled down first (the reference has no such bound). Video is refused. - tower (`inkling2_vision.rs`): Linear patch embed, CLS token, a learned 32x32 position table resampled bilinearly per image, pre-LayerNorm, 23 blocks with axial 2D RoPE on Q/K and layer scale, then a bias-free projector over each 2x2 block. It runs on the shared `vision_encoder` kernels (the nemotron file, symlinked): q/k rows are permuted per head at load from the reference's interleaved rotation pairs to the kernels' halves, and layer scale is folded into out_proj / c_proj. - prompt: the template writes one image token per image; `expand_vision_pads` repeats it per tile (no start/end markers). - embedding norm: the reference norms token embeddings inside the embedding and scatters image features in afterwards. The first visit normed its whole input, which also normed image rows (coarse content survived, text in an image did not). The table is now normed once at load, in place, with the same kernel and epsilon, and no visit norms; the drafter's anchor row skips its own copy of that norm (`embed_norm` NULL). Checked on one GB10 (Strict, development build): tower output against the transformers implementation on a 760x300 text image (152 tokens): mean row norm 5.437 vs 5.432 (float32), sampled values within 0.003; an invoice image transcribed exactly, a 3x3 labelled colour grid read 9/9. Greedy text of three text prompts byte-identical to d1b138e after the norm moved. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…l stops at the depth
Two sequences always verified the drafter's whole block (`batch_depth`
took the table only from three), so `ATLAS_DFLASH_BATCH_DEPTH=...,2:3`
still ran 16-row verifies. An operator's table now bounds two sequences as
well; without one nothing changes (the default table's 7 is what two
sequences had, and a 15-draft drafter keeps its block).
Inkling 2's DSpark tail ran all seven recurrent draft steps whatever the
step would verify. It now runs the step's depth
(`InklingScratch::set_tail_steps`); a shorter tail runs eagerly and the
captured tail graph stays the whole block's.
Observed on one GB10 (Strict, short code, 256 tokens a request, two
rounds, development build), aggregate tok/s:
two sequences plain 53.7-54.2; 2 drafts 54.7-55.8; 3 drafts 52.8-54.4
(before: any table at two ran 7 drafts, 38-45)
per step at two, 2 drafts: verify 6 rows 56.2 ms, propose 18.6 -> 13.9 ms
four sequences, 1 draft: 66.8-69.7 against 79.4 plain (propose 25.6 ms)
Four sequences still lose: each sequence proposes alone and reads the
vocabulary head once (about 3.8 ms each).
Co-Authored-By: Claude Fable 5.2 <[email protected]>
…tops paying decodes plain With two live sequences each DSpark propose runs alone and reads the target's vocabulary head once for its block. A step that verifies two drafts per sequence needs three head rows of each, so the scheduler now brackets a step's per-sequence proposes (`mtp_group_begin` / `mtp_group_finish`): each propose's tail hands its normed rows, its recurrent context and its anchor to the group, which runs the head once over all held rows, then each member's draft steps, and reads the drafts back in one copy. A propose that captures its graphs keeps its own tail. The draft steps moved to `inkling_tail.rs` unchanged, shared by both paths. The adaptive rule (`ATLAS_DFLASH_ADAPTIVE`) judged every step against a whole block's threshold, and the batched DSpark verify never acted on its verdict. A step narrower than a block is now judged with its batch: the members' pooled mean accepted against the threshold scaled to the rows the step verifies. A batch below it proposes nothing and decodes plain, batched, until the re-probe; the members stop together because a batch that drafts for one sequence and not the other runs two forwards a step. Whole-block steps are judged as before. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), preliminary and single-harness: two 700-token code requests 72.7-74.1 tok/s aggregate with two drafts each against 52.7-54.8 plain (Strict), 82.8-86.3 against 73.6-75.1 (Spark); two 500-token prose requests 54.5-56.2 (Strict, level with plain) and 67.0-72.2 against 75.6-76.1 (Spark, where the pair hold recovers most of a 62-65 loss but not all of it). A group's propose for two sequences took 10.2 ms against 18.6 ms. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…p where the drafter is unsure `ATLAS_DFLASH_CONF_WIDTH` sizes a verify from the drafter's own confidence in its drafts (`dflash_conf_width`), but only the DFlash2 selector reported any. Inkling 2's recurrent tail now does: a new kernel, `inkling2_dspark_pick`, takes a draft row's argmax (lowest index among equal maxima, as `argmax_bf16`) and the log-probability of that pick under the softcapped logits the reference samples from (`markov_logits`), and the tail writes the confidences after the block's tokens, where the head's readback and `draft_conf` already look. Off (the default) the tail launches `argmax_bf16` as before. A step's group (two live sequences) does not report confidences; its steps are two drafts wide. The reference turns adaptive verification off for this drafter (`Inkling2DSparkSpeculator` asserts `not enable_adaptive_verification`). Observed on one GB10, dev build, other services resident (0.5 of GPU memory), RigMark decode suite, reasoning low, preliminary and single-harness: over 3,046 full-width verifies the target accepted 98% of drafts with confidence above -0.01, 84% in [-0.03, -0.01), 45% in [-0.5, -0.35) and 6% below -1.5. With the rule on (tau 0.3) and drafts never suspended, a Strict drafted step took 52-56 ms against 76-80 ms and code decode read 65.0 tok/s against 57.4-60.2. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…be starts short The suspension rule held every verify step to a whole block's threshold. With a verify width rule on (`ATLAS_DFLASH_CONF_WIDTH`, `ATLAS_DFLASH_ADAPTIVE_WIDTH`) most steps offer two or three drafts, so a threshold of two accepted suspended nearly everything (Inkling 2, Spark weights: structured output 62.6 tok/s against 95). Each step now owes a share of the threshold: a quarter for its propose plus three-quarters scaled by the drafts it verified. A whole block owes the threshold, as before. The wait before a re-probe was the fixed interval (256 tokens), which overshoots: code that drafts badly through a comment drafts well again a few tokens later. It now starts at an eighth of the interval and doubles with each probe in a row that fails, to four times it, and resets when a window pays. Prose ends up probed less often than before; code is back in a few dozen tokens. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), RigMark decode suite, reasoning low, two runs each, the throughput gate bypassed (`ATLAS_MTP_GATE_FORCE=1`) and confidence widths on, preliminary and single-harness. Strict, threshold 2.0: code 64.7 tok/s (64.7-64.7), prose 36.3 (36.2-36.4), structured 91.8 (90.5-93.1); with the first wait at a quarter of the interval and the gate on, code 58.0. Spark, threshold 2.5: code 75.2 (73.7-76.8), prose 54.8 (54.7-55.0), structured 100.6 (99.4-101.8); at 3.3: 72.6 / 55.4 / 99.1. SparkInkling 0.4.1's release figures for the same cells, measured with nothing else resident: Strict 54.2 / 35.0 / 79.9, Spark 68.4 / 54.9 / 95.3. Co-Authored-By: Claude Fable 5.2 <[email protected]>
… is the text without A verify run of one sequence took the tensor-core prefill attention body, and a run of several sequences the decode body with unsplit keys. Both sum a row's keys in another order than a decode row does (32 key splits), so a verified token's logits could differ from plain decode's by one BF16 step. That is enough to turn a tie: on a prose prompt plain decode scored " for" and " with" equal and picked " for"; the verify put " with" 0.125 ahead, and the two texts parted there. `attn_body` now sends every row of a verify run (up to MAX_VERIFY_ROWS rows a sequence, while the partials scratch holds them split) through the decode body at the decode's key splits. Prefill chunks keep the tensor-core body, and several sequences' prefill rows the unsplit decode body. A prefill chunk of 16 rows or fewer also takes the decode body now. Routing the experts, the router logits and the vocabulary head through their one-row kernels changed nothing in the same test; attention alone made the texts match. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), preliminary and single-harness. Greedy text, reasoning low, 8 prompts (4 code, 4 prose) x 320 tokens, sha256 of reasoning and answer: with drafts off, drafts always on, and confidence widths with the suspension rule, one request at a time and two at once, all 8 texts were identical in every pairing, in Strict and with the Spark overlay (before: the prose prompt parted after 297 characters of reasoning). The verify forward measured 58.7-63.0 ms against about 66 ms, and the RigMark decode suite read Strict 65.2 / 36.1 / 91.9 tok/s and Spark 77.7 / 55.2 / 100.3 (code / prose / structured), level with or above the runs before it. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The pair rule scaled the block threshold by the rows a step verifies, anchor row included (three of eight for two drafts: 0.75 accepted a sequence at a threshold of 2.0). The batch pays for one row a sequence whether it drafts or not, so only the draft rows are extra: two of eight, 0.5. That is where drafting for two Inkling 2 requests was measured to break even with the checkpoint's weights, and 0.625 at the Spark overlay's threshold of 2.5 against a measured 0.64. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), preliminary and single-harness: two 700-token code requests 74.7 and 73.8 tok/s aggregate (at the old scale 73.1 and 63.4, the slower run held five times) against 54.7-55.1 plain; two 500-token prose requests 53.4-53.7 against 54.8-54.9 plain. Text identical to plain decode in both. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Two more commits on this draft since it was opened (head
Both are preliminary, single-harness numbers. Still a draft, still to be rebased after 404. 🤖 Generated with Claude Code |
A local decode batch is padded to the captured-graph ladder (2, 4, 8 rows), so three Inkling 2 sequences ran as four rows and five to seven as eight. Each of its rows reads its own experts (about 1.7 GB, 6 ms on one GB10) whether or not a sequence is behind it, and its layers take any row count. Up to eight sequences it now dispatches the exact width, one captured graph a width, as the distributed GLM lane already does (`decode_dispatch_width`); past eight, and for every other model, the ladder is unchanged. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), checkpoint weights, plain batched decode, 250-token code requests, aggregate tok/s, two rounds each, preliminary and single-harness: requests padded exact 3 57.1, 57.7 65.8, 67.5 4 82.7, 80.2 81.4, 81.9 5 77.5, 79.0 90.8, 93.0 6 89.4, 89.1 102.7, 103.0 7 101.0, 101.3 113.2, 112.5 8 120.2, 119.8 120.1, 120.2 Padded, five requests delivered fewer tokens a second than four. Every request's text was identical before and after. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
One more commit on this draft (head 🤖 Generated with Claude Code |
…split, Atlas-Inf#403, Atlas-Inf#404, Atlas-Inf#406, Atlas-Inf#410) into the images follow-up Two conflicts, both from the split of 401: layers/inkling2/mod.rs declares owner_runs and proj, and inkling2_proj_gemv joins the PDL list in its new file pdl_inkling2.rs. The tree equals this branch's five commits replayed onto main. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…to the drafting follow-up The tree equals this branch's twelve commits replayed onto main. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Brought up to 🤖 Generated with Claude Code |
With the Spark overlay a visit's q, k, v, relative-bias and gate projections are NVFP4 and its sinks and dynamic-conv taps BF16, so the fused `inkling2_proj_gemv` (BF16 only) did not apply and a decode row ran six to eight GEMV launches a visit. `inkling2_proj_gemv_mixed` runs them as one: each segment of a 48-byte table names its weight, and an NVFP4 segment's block scales and global scale; every output is the chain its own kernel computes (`w4a16_gemv`'s body for NVFP4, `dense_gemv_bf16`'s for BF16), so the text is unchanged. It is used for one decode row where the target ships the kernel and no NVFP4 weight has per-row scales; more rows keep one launch a projection. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), preliminary and single-harness: greedy text for 8 prompts x 320 tokens identical with the kernel and without; a Spark decode step 18.81 -> 18.16 ms with 1,707 -> 1,453 launches a token (nsys); RigMark decode suite, two runs each, code 77.7 / prose 56.9 / structured 100.8 tok/s against 77.7 / 55.2 / 100.3 before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Inkling's DSpark drafter proposed one sequence at a time: with eight live sequences a step ran eight drafter forwards, eight vocabulary-head passes and eight Markov tails (52 ms for one draft each, 77 ms for seven, against 66 ms for the whole plain decode step). It now takes the staged batched propose generic DFlash uses: the drafter layers and the head run once over every sequence's block (`batch_propose.rs`), with Inkling's two additions (`inkling_batch.rs`): - before the layers, each sequence's block input (its anchor's embedding, then `mask_embed`) in one launch, and its recurrent-head context row from the newest of its accumulator rows; - after the head, the recurrent Markov tail for every sequence at once: the gate context, gate and pick kernels take a sequence dimension, and the fold over the vocabulary head (105 MB) is read once a step for up to eight sequences (`dense_gemv_bf16_batchm`, row-exact with the one-row GEMV). The pick adds the bias as `bf16_residual_add` does, so the tail's drafts are the serial tail's for the same base logits. Context projection stays per sequence (`batched_ctx.rs`): Inkling mixes its taps per draft layer. `propose_batch_max` no longer pins Inkling to one sequence; the shared head pass (`inkling_group.rs`) remains for servers without the staged path. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), preliminary and single-harness. Greedy text for 8 prompts x 320 tokens with drafts on, two and four requests at once, was identical to drafts off one at a time, with the checkpoint's weights and with the Spark overlay; no batched-propose fallbacks or engine errors. A propose step for one draft each took 13.3 ms at four sequences (was 13.8 with the shared head pass), 16.6 ms at six (was 38.3) and 20.4 ms at eight (was 52.1); for two drafts at two sequences 10.9 ms (was 10.2). Eight 250-token code requests with one draft each read 96.8-96.9 tok/s aggregate, up from 79.9, and six 92.3-94.8, up from 77.5-78.7: still under plain decode (120 and 103), because a verify of nine rows or more leaves the decode kernels. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keeps batch_propose.rs under the 500-line cap (it reached 504). No change in behaviour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Three more commits on this draft (head
Still a draft, still to follow 405. 🤖 Generated with Claude Code |
…ting is exact at any concurrency A verify of more than eight rows (several sequences, or a deep block) left the decode kernels: projections and the router went to the BF16 tile GEMM, a Spark NVFP4 projection from 16 rows to the checkpoint's BF16 weight, the message gates to their fused MMA kernel, the routed experts to the tensor-core prefill GEMMs with quantized inputs (the checkpoint's prefill numerics), and the BF16 head to the tile GEMM. Text with drafts then differed from text without, and run to run. A verify run (journaled rows) now takes decode's kernels at every row count: projections, the router and the head in passes of the batch GEMV tiers (8 rows BF16, 15 or 16 NVFP4), the two unfused message gates, and the experts through the decode path (`moe_batched`). Each row is the one serial decode computes. Prefill rows and plain batched decode are unchanged. Observed on one GB10, dev build, other services resident (0.5 of GPU memory), preliminary and single-harness. Greedy text for 8 prompts x 320 tokens with drafts on at four and at eight requests, one draft each and seven each (64-row verifies), was identical to drafts off one at a time, with the checkpoint's weights and with the Spark overlay. Eight 250-token code requests, tok/s aggregate, Strict: one draft each 105.7-106.3 (97 before; plain 116-121), seven each 77.5-77.7 (97-102 before: the decode experts cost more than the tensor-core GEMMs at 64 rows); eight prose requests 94-95 and 52. Spark: one draft each 102.0 (plain 125-132), seven each 75.4. Drafting past two requests still trails plain decode, and SparkInkling does not draft past two. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
One more commit (head Observed, dev build, one GB10, other services resident: greedy text for 8 prompts x 320 tokens with drafts at four and eight live requests, one draft each and seven each (64-row verifies), identical to drafts off one at a time, Strict and Spark. Speed at eight requests, one draft each: 106 tok/s aggregate Strict (97 before), 102 Spark; seven each slower than before (78 vs 97-102), since the decode experts cost more than the tensor-core GEMMs at 64 rows. Preliminary, single-harness. 🤖 Generated with Claude Code |
Under `--tool-guard stream` every request got its tool calls as they were written. A client that does not read `content_filter` would run a call the guard blocked at its end, or an unclosed one. A request now gets streamed tool calls only with the body field `stream_tool_arguments: true` (an Atlas extension on /v1/chat/completions); without it the call is held, and the response is the same as under `--tool-guard on`. This covers the generic stream path and the Poolside v1 string-argument path. Under `on` and `off` the field is accepted and ignored. A working-directory hint, ATLAS_BUFFER_TOOL_ARGS and tool retry still hold a call as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Under `--tool-guard stream` every request got its tool calls as they were written. A client that does not read `content_filter` would run a call the guard blocked at its end, or an unclosed one. A request now gets streamed tool calls only with the body field `stream_tool_arguments: true` (an Atlas extension on /v1/chat/completions); without it the call is held, and the response is the same as under `--tool-guard on`. This covers the generic stream path and the Poolside v1 string-argument path. Under `on` and `off` the field is accepted and ignored. A working-directory hint, ATLAS_BUFFER_TOOL_ARGS and tool retry still hold a call as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Queued in train #421 ( 🤖 Generated with Claude Code |
…rix-hip #408's inkling2_proj_gemv_mixed includes ../../common/w4a16_gemv.cu. The strix-hip build widens warp-mask literals to 64-bit only inside a kernel directory it mirrors; a parent-relative include resolves to the file as written, so hipcc hit HIP's 64-bit mask static_assert at every __shfl_*_sync in w4a16_gemv.cu (DevLab run 45567206595). The 19 sites now take W4A16_WARP_MASK: 0xFFFFFFFFULL on HIP (what the mirror would write), 0xFFFFFFFF elsewhere. dense_gemv_bf16_batchm.cu, which the same kernel includes, already branches this way. GB10 PTX is byte-identical before and after (sm_121f): w4a16_gemv.cu 519,554 B, inkling2_proj_gemv.cu 629,390 B. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@data-angel On your question about the re-probe wait: I'd keep the fixed interval as the default. Same-binary A/B from train #421 (
On this harness the checkpoint drafter accepts about 0.5 drafts per step under Strict, on main as well. Re-probing 5× as often costs 3–8% there. The train's gate shows the same pattern against #404's gate (strict json 35.2 → 34.0, Spark json 56.2 → 53.5). Your RigMark code numbers move the other way, so it depends on the text. Proposal (no new env name): keep the backoff, but start it at Would you push that here, or should I add it on the train as a follow-up commit? The rest of the gate is in #421 (drafted == plain on both checkpoints; ST-995 80.40 / 81.16). sparky nightq 188b · train 🤖 Generated with Claude Code |
|
The proposed change is ready and measured (sparky job 194, on train #421): 🤖 Generated with Claude Code |
…ute.rs, code moves only) #408, #412 and #414 each grew glue.rs; merged it is 505 lines and the file-size-cap job fails. The router top-k and the KV page write move as is to a second impl block in glue/route.rs (446 + 74 lines). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y/atlas inkling2/dflash2-drafter, @data-angel) GB10 (sparky 206b): Strict + #408 release env, prose/code/json 45.6/59.8/50.8 tok/s vs DSpark 38.4/54.5/41.7; drafted == plain 8/8; DSpark and Qwen3.8-27B unchanged; 5,925 tests pass. AMD (DevLab 45692478756): strix-hip builds, Strict/Spark --check, Spark serves C1 42.8 / C8 85.4.
Third follow-up to Atlas-Inf/atlas 401, stacked on the images follow-up
(405, head
1a3675294). Both carry a merge ofmainat7a717b659;until 405 merges, the diff here shows its six commits too. This PR's own part is 35 files, +1,969 / -203. Its head
(
d3318e087) is the engine SparkInkling 0.4.2 ships, and the figures under Release run are from that release.Still a draft so 405 can be reviewed first.
What
Inkling 2's DSpark drafter is accepted as often on Atlas as in vLLM (code: first draft 80-84%, 3.2-3.8 drafts a step;
vLLM's own log on the same suite reads 69-93% and about 3.4), so what was left was the cost of a drafted step. An
extra verify row reads about 1.7 GB of expert weights, 5.6-6.5 ms on one GB10, whether or not the draft in it
survives. The commits make a drafted step cheaper, make drafted text exactly plain decode's text, and stop padding
plain batches.
Two live requests (
6615eacb0,5e5d115b8)ATLAS_DFLASH_BATCH_DEPTHnow bounds two sequences as well (dflash_width::batch_depth): the table was ignored atexactly two, where the depth stayed at seven or more. Without a table nothing changes.
InklingScratch::set_tail_steps); the capturedtail graph stays the whole block's and a shorter tail runs eagerly.
(
DraftProposer::group_begin/group_finish,Model::mtp_group_begin/mtp_group_finish, default: no group).Inkling's DSpark uses it for the vocabulary head: each propose's tail hands its normed rows, recurrent context and
anchor to the group, which runs the head once over all held rows (
inkling_group.rs). The draft steps moved toinkling_tail.rsunchanged.threshold scaled to the rows the step verifies, the batch proposes nothing and decodes plain, batched, until the
re-probe (
adaptive_spec::judge_narrow,plain_hold_step). Whole-block steps are judged as before.Confidence-sized verifies (
fa3bd1967)ATLAS_DFLASH_CONF_WIDTHneeds a confidence per draft and only the DFlash2 selector reported one. Inkling's tailnow does:
inkling2_dspark_pickreturns a draft row's argmax (lowest index among equal maxima, asargmax_bf16)and the log-probability of that pick under the softcapped logits the reference samples from. The confidences ride
the existing draft readback (
draft_conf). Off, the tail launchesargmax_bf16as before. vLLM's speculator turnsadaptive verification off for this drafter.
The suspension rule (
67acea8f5,185add96e), which changes behaviour for every model that setsATLAS_DFLASH_ADAPTIVE=1ATLAS_DFLASH_ADAPTIVE_MIN: a quarter for its propose plus three-quarters scaled by thedrafts it verified. A whole block owes the threshold, so without a verify width rule nothing changes here. With
one, the old rule suspended nearly every step (Inkling 2, Spark weights: structured output 62.6 tok/s against 95).
ATLAS_DFLASH_ADAPTIVE_REPROBEand doubles with each probe in arow that fails, up to four times it; a window that pays resets it. This part is not gated: with the default
interval the first wait is 32 tokens instead of 256. On Inkling it is the difference between code at 58 and 64.7
tok/s (Strict). I have not measured it on another model. If you would rather it sat behind the model, or kept the
fixed interval by default, say so and I will change it.
185add96e): the pair rule had scaled the threshold by the rows astep verifies, anchor row included (three of eight for two drafts). The batch pays for one row a sequence whether
it drafts or not, so only the draft rows count: two of eight. Two 700-token code requests read 74.7 and 73.8 tok/s
aggregate (73.1 and 63.4 at the old scale) against 54.7-55.1 plain; text identical to plain decode.
Text with drafts is the text without (
d46ba18af,1479d3bbc)with unsplit keys. Both sum a row's keys in another order than a decode row (32 key splits), so a verified token's
logits could differ from plain decode's by one BF16 step, enough to turn a near tie.
attn_bodynow sends everyrow of a verify run through the decode body at the decode's key splits; prefill chunks keep the tensor-core body.
and the router went to the BF16 tile GEMM, a Spark NVFP4 projection to the checkpoint's BF16 weight, the message
gates to their fused MMA kernel, the experts to the tensor-core prefill GEMMs with quantized inputs, the head to
the tile GEMM. A verify run (journaled rows) now takes decode's kernels at every row count: projections, router
and head in passes of the batch GEMV tiers (8 rows BF16, 15 or 16 NVFP4), the two unfused message gates, and the
experts through
moe_batched. Each row is the one serial decode computes. Prefill rows and plain batched decodeare unchanged.
eight requests and up to seven drafts each (64-row verifies), was identical to drafts off one at a time, with the
checkpoint's weights and with the Spark overlay (dev build, other services resident).
One propose pass for every live sequence (
5508f7d9d,f9306caa1)Inkling's DSpark proposed one sequence at a time: eight live sequences ran eight drafter forwards, eight vocabulary
head passes and eight Markov tails (52 ms for one draft each). It now takes the staged batched propose generic DFlash
uses (
batch_propose.rs): the drafter layers and head run once over every sequence's block, with Inkling's blockinput and recurrent-head context before them and the Markov tail for all sequences after them
(
inkling_batch.rs). The tail's fold over the vocabulary head (105 MB) is read once a step for up to eightsequences with
dense_gemv_bf16_batchm(row-exact with the one-row GEMV), and the pick adds the bias asbf16_residual_adddoes, so the tail's drafts are the serial tail's for the same base logits. A propose step forone draft each: 13.3 ms at four sequences, 16.6 ms at six (was 38.3), 20.4 ms at eight (was 52.1).
propose_batch_maxno longer pins Inkling to one sequence; the shared head pass (inkling_group.rs) remains forservers without the staged path.
Decode batches at their own width (
c86d0e312)A local decode batch was padded to the captured-graph ladder (2, 4, 8), so three Inkling sequences ran as four rows
and five to seven as eight, each padded row reading its own experts. Up to eight sequences it now dispatches the
exact width, one captured graph a width, as the distributed GLM lane already does (
decode_dispatch_width); pasteight, and for every other model, the ladder is unchanged. Plain batched code, aggregate tok/s, padded -> exact:
3 requests 57.1-57.7 -> 65.8-67.5, 5: 77.5-79.0 -> 90.8-93.0, 6: 89.1-89.4 -> 102.7-103.0, 7: 101.0-101.3 ->
112.5-113.2; 4 and 8 unchanged. Text identical.
One launch for a Spark decode row's input projections (
76d866b15)With the Spark overlay a visit's q, k, v, relative-bias and gate projections are NVFP4 and its sinks and conv taps
BF16, so #405's BF16-only fused projection did not apply.
inkling2_proj_gemv_mixedruns them as one launch from a48-byte segment table, each output the chain its own kernel computes (
w4a16_gemv's body for NVFP4,dense_gemv_bf16's for BF16), so text is unchanged. A Spark decode step 18.81 -> 18.16 ms, 1,707 -> 1,453 launchesa token (nsys).
Streamed tool calls only on request (
54f0556f6)The same change as 405's
1a3675294(identical diff; this branch also merges that one), so this head carries itwhichever merges first.
Outside the Inkling files
adaptive_spec: the step share, the re-probe waits and the narrow-batch verdict. The re-probe change is not gated(see above); the rest needs a verify width rule or two-sequence drafting to apply.
dflash_width: the depth table bounds two sequences.DraftProposer::group_begin/group_finishandModel::mtp_group_begin/mtp_group_finish, default no group.batch_propose.rs/batched_ctx.rs: hooks for a drafter's own block input and tail; generic DFlash unchanged.decode_a2/glm.rs: the exact-width dispatch, Inkling only.lm_head_batched.rs: the head in batch-GEMV passes fora journaled verify of 9 to 64 rows, Inkling only.
ATLAS_*names.Release run
SparkInkling 0.4.2: this head in the image
ghcr.io/enntity/atlas-sparkinkling:b1e18bf91437, RigMark protocol1.1.0 on one GB10 with nothing else serving, default profile, DSpark with
ATLAS_DFLASH_CONF_WIDTH=1,ATLAS_DFLASH_ADAPTIVE=1andATLAS_MTP_GATE_FORCE=1(Strict depth table1:7,2:2,1000000:0, Spark1:7,1000000:0with threshold 2.5), medians of two runs, tok/s; receipts inEnntity/sparkinkling results/2026-11-23-release-0.4.2.
Strict structured output read 91.7 and 93.4 (on 405's engine, 72.7 and 87.1: the throughput gate's carried state).
Both images were measured the same way; the vLLM rows on 2026-11-20.
Tests
re-probe waits (
adaptive_spec,dflash_width_tests);a_verify_run_attends_as_decode_rows_do,a_run_the_scratch_cannot_split_keeps_its_old_body,a_mixed_table_lays_out_the_kernels_entries,the_fold_runs_in_waves_of_eight_rows,inkling2_decodes_at_its_exact_width_up_to_eight,stream_tool_arguments_is_an_opt_in_request_field.Dockerfile) and Clippy.
thinking on and off and forced; images; a voice-agent turn pattern.
spark benchmark run <gate> --pull-request-gategates: left to the maintainers.Not in this PR
Drafting that pays with three or more live requests. The propose is now one pass, but a verify row still costs more
than its drafts return at that width: eight short-code requests read 105.7-106.3 tok/s drafting one token each
against 116-121 plain (Strict, dev build), so SparkInkling decodes plainly from three. The choice of settings lives
in SparkInkling's launcher.
Authorship
AI-authored: Claude (Opus 5.5 and Fable 5.2) in Claude Code, directed and reviewed by a human; no hand-written code.
CLA
🤖 Generated with Claude Code