Skip to content

Shorten Inkling 2 prefill and drafting rounds on DGX Spark TP4 - #312

Open
original-el8 wants to merge 11 commits into
inkling2/dgx-spark-tp4from
inkling2/spark-performance
Open

original-el8 wants to merge 11 commits into
inkling2/dgx-spark-tp4from
inkling2/spark-performance

Conversation

@original-el8

@original-el8 original-el8 commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Inkling 2 Small NVFP4 at TP4 on four DGX Sparks spent most of a prefill chunk outside its attention and expert kernels and paid about 11 ms per drafting round for no tokens. This change shortens prefill, drafting rounds and one-token decode rounds in eight commits, each described below with its own reasoning, change, result and evidence, in commit order. The base branch is inkling2/dgx-spark-tp4, which enables the recipe across hosts.

The commits require three FlashInfer changes that Flare's pinned revision lacks: local-inference-lab/flashinfer#110 (FP32 accumulation for BF16 projections), #111 (swapped-operand NVFP4 FC1 for 32-aligned widths) and #112 (window staging lookback). This is a draft until the pin can move to a merged FlashInfer commit.

1. Shorten Inkling 2 prefill with BF16 router operands and a fused mix and norm

Why

Inkling 2 Small prefill on DGX Spark TP4 spent 994 ms of a 3,808 ms 8,192-row chunk in the expert router's projection, which widened its BF16 source and weight to FP32 so that only b12x's FP32-operand kernels were eligible, and 376 ms in attention-residual mixtures that stored an FP32 mixture per stream for a separate RMSNorm launch. The router needs FP32 accumulation, not FP32 operands: the product of two BF16 values is exact in FP32. The mixture and its norm read and write the same rows, so one program can normalize without storing the mixture.

Change

The router projection takes its BF16 source and a BF16 router weight and declares accumulation="fp32", which UnquantizedProjection passes to b12x so that only plans carrying the whole sum in FP32 are raced. The weight loader delivers the FP32 checkpoint tensor as BF16 only after checking that every value is an exact BF16 upcast. PreparedResidualMix normalizes each stream in the mixture kernel with FP32 mean square, scale and weight and one rounding to BF16; PreparedRMSNorm leaves this path. Prefill attention writes its partial sum in the cross-rank reduction's element type, BF16 over RoCEnante and FP32 on one host, in place of FP32 followed by a cast; decode and verification keep FP32.

Result

Prefill time to first token on four DGX Sparks falls by a factor of 1.5 to 1.6. Router selection is unchanged in value class: operands are the same numbers and only summation order differs. The fused norm differs from the unfused one by at most one BF16 unit in at most ten elements per million.

Evidence

one exported core per tree served by flare run at TP4 on GB10, 8,192-row chunks, warm and uncached, three repeats. Time to first token was 2.59 to 2.69 s at 7,668 prompt tokens (4.18 to 4.51 s before), 22.4 to 23.0 s at 67,145 (35.2 to 35.4 s) and 48.8 to 49.8 s at 131,990 (73.5 s). The measured core also contained FlashInfer's swapped-operand FC1 selection and the drafting changes, so the factor is not attributable to this commit alone. In a kernel trace of rank 0, an 8,192-row chunk spans 2,509 ms with routing at 159 ms and mixtures with norms at 247 ms. On one GB10 the router projection for 8,192 rows takes 2.14 ms against 19.5 ms, with the same top-8 experts on every row. tests/recipes/test_inkling2_target.py passes 87 tests on a GB10 with the checkpoint, including attention against the reference in prefill, decode and verification and the fused-norm bound.

Limitations

the projection requires GemvQuery.accumulation from FlashInfer (local-inference-lab/flashinfer#110), which the pinned FlashInfer revision lacks. Completion length was compared between a core from this tree with the drafting changes and a core from the unmodified tree: over lookup prompts with seeds 1 to 30, median completion tokens were 363 against 420 and the share at or above 1,024 tokens differed by -1.7 points (95% interval -7.2 to +3.8), with no wrong answer in 540 and 480 responses. tests/server/test_inkling2.py's prefix-reuse case, which fixes one seed and a 1,024-token limit, fails in 9 of 20 repeats on the changed core and 5 of 20 on the unmodified one. Single-host RTX PRO 6000 serving was not run. This PR is a draft until Flare's FlashInfer pin can move to a main revision containing the FlashInfer changes named above; it is stacked on the Inkling 2 DGX Spark TP4 PRs (#304, #305).

2. Cut the fixed cost of Inkling 2 drafting rounds and add proposal-head formats

Why

On DGX Spark TP4 a drafting round of Inkling 2 Small cost about 39 ms plus 4.5 ms per verified draft against a 28 ms decode step, so 11 ms of each round bought no tokens and the balanced policy rarely chose to draft. Verification staged each sliding-window layer's history with PyTorch gathers over whole rings and committed accepted rows by rewriting whole rings, the recurrent head projected its draw-independent context once per draft position, and proposal heads read BF16 only. These costs do not depend on the draws or on the number of drafts, so they can leave the per-round path without changing what verification computes.

Change

Verification attention stages each request's preceding window and its candidate rows with one PreparedWindowStaging kernel per layer and commits accepted rows with one PreparedRingCommit kernel. PreparedWindowStaging gains lookback, the count of preceding positions staged from a ring that retains more than attention reads, and PreparedRingCommit gains candidate_offset, the record index at which staged candidates start; both default to their earlier meaning. The recurrent proposal head projects the block's states and target context once per block, proposals read one embedding row per request, and staging plans are shared between layers. --draft-head-quantization nvfp4 or mxfp8 and --markov-head-quantization fp8 prepare proposal-only copies computed from checkpoint values at load; target verification keeps the BF16 head, so they change which tokens are proposed, never the output distribution. Both flags default to omitted.

Result

A drafting round at one request costs about 34.7 ms plus 4.7 ms per verified draft: the fixed cost over a decode step falls from about 11 ms to about 6 ms and the per-draft cost is unchanged. The preparation graph pool falls from 2,840 MiB to 2,092 MiB per rank.

Evidence

one exported core per tree served by flare run at TP4 on GB10, one request, ordinary prompts, a fresh launch per verification row budget. Rounds verifying 2 to 8 target rows took 39.3, 45.0, 49.9, 54.4, 58.9, 62.1 and 67.3 ms against 43.7, 48.5, 53.2, 57.4, 61.6, 67.1 and 70.5 ms. Drafting rounds took 215 to 248 ms at 16 requests (237 to 272 ms) and 279 ms at 32 (342 to 461 ms). The measured core used --draft-head-quantization nvfp4; acceptance at draft depths 1 to 4 was 81, 63, 48 and 35% on ordinary prompts against 79, 61, 48 and 36% with the BF16 head, so the NVFP4 head neither raised nor lowered acceptance. The measured core also contained the prefill changes of the preceding commit. On a GB10 with the checkpoint, test_inkling2_target.py (87), test_inkling2_window.py (9) and test_inkling2_dspark_cuda.py (15) pass, covering verification attention against the reference and staged and committed rings against PyTorch.

Limitations

verification staging requires WindowStageKernel's lookback from FlashInfer (local-inference-lab/flashinfer#112), which the pinned revision lacks. --markov-head-quantization fp8 and the MXFP8 draft head were not measured in serving. Aggregate decode throughput is within a few percent of the unmodified tree. lookback and candidate_offset extend two existing component contracts with defaulted parameters; no graph kind is added. This PR is a draft until Flare's FlashInfer pin can move to a main revision containing the FlashInfer changes named above; it is stacked on the Inkling 2 DGX Spark TP4 PRs (#304, #305).

3. Shard the row-local stages of Inkling 2 prefill across hosts

Between two cross-host reductions, an Inkling 2 decoder layer computes stages whose result for a row depends on that row or on the three rows before it: the attention-residual mixtures with their norms, the output convolutions, the expert router and the residual additions. In tensor-parallel prefill every rank computed them for every row of the chunk. On one GB10 they take 773 ms of an 8,192-row chunk, and four ranks produce four identical copies. RoCEnante's pipelined all-reduce is a reduce-scatter followed by a shard gather, so a rank can keep its quarter of the rows after the first half, compute these stages for those rows only, and gather where every rank needs every row, at the wire bytes of the all-reduce it replaces.

Prefill graphs of at least 2,048 rows on ranks that reduce over RoCEnante shard their rows (SHARDED_PREFILL_ROWS in the Inkling 2 decoder). PreparedReduceScatter and PreparedShardGather in ignition/components/collectives.py prepare the two halves of the pipelined all-reduce as separate captured operations. ignition/components/row_shards.py holds row ownership, each rank's view of the batch metadata, a column gather that exchanges the three rows before each rank's rows and each request's last three rows after every reduce-scatter (the output convolutions and their replicated histories read them), and PreparedRouteGather, which carries each row's int32 expert IDs and FP32 route weights as bytes in BF16 lanes. The decoder's layer loop and final mixture move into PreparedStack; in a sharded graph the residual state holds a rank's rows, and shard gathers supply the attention input streams, the expert input, the drafter taps and the final normalized rows. Row ownership follows graph capacity, so a rank whose rows are padding computes inactive rows. Smaller prefill graphs, decode, verification and ranks on one host are unchanged. Helios and the package contract are unchanged; a core gains sharded prefill when it is exported again.

A sharded 8,192-row chunk computes the row-local stages once across the four ranks and runs 361 collectives where the replicated chunk runs 97. Every row-local value, route, gathered row and convolution history equals the replicated forward bit for bit.

Evidence: on one GB10 with the checkpoint, the row-local stages of 48 layers take 175.7 ms for a rank's shard against 773.4 ms for 8,192 rows, and 37.5 ms against 173.3 ms at 2,048 rows, with no differing element. tests/components/test_row_shards.py (41 tests) covers ownership, halo and tail selection and capacity checks; tests/recipes/test_inkling2_row_shards_cuda.py (6 tests) compares four ranks' sharded forwards of a five-layer stack with the replicated stack through an in-process exchange, eagerly and through a compiled, captured and replayed forward, on an RTX PRO 6000 and a GB10; tests/recipes/test_inkling2_target.py passes 87 tests on a GB10. One core exported from this tree with FlashInfer 4fd836dc plus the FlashInfer changes this branch's parents require served at TP4 on four DGX Sparks with 8,192-row chunks: tests/server/test_inkling2.py -k default-effort passes 7 of 7 and 32 concurrent requests complete. Over three service launches, time to first token was 2.07 to 2.34 s at 7,668 prompt tokens, 18.4 to 20.1 s at 67,145 and 40.7 to 43.1 s at 131,990, three repeats each; one launch of the core exported from the parent commit measured 2.59 to 2.69 s, 22.4 to 23.0 s and 48.8 to 49.8 s. In kernel traces of rank 0, a 7,168-row chunk spans 1,809 ms sharded against 2,034 ms replicated: collectives 586 ms against 508 ms, mixtures and norms 70 ms against about 216 ms. Limitations: a fourth launch of the sharded core ran every graph, decode included, about 10% slower (2.85 to 2.96 s and 48.8 to 53.8 s) for a cause that was not identified, and the replicated core was measured on one launch, so the serving comparison does not exclude a launch effect of that size. Capacities between 2,048 and 8,192 rows are not measured in serving; the threshold is an estimate.

4. Store Inkling 2 attention projections as MXFP8 with --online-mxfp8

An Inkling 2 decoder layer projects its input by a fused BF16 weight (query, output gate, key, value, relative-bias factors and sink logits) and its attention result by a BF16 output weight. At TP4 a rank reads 2.36 GB of these weights in every decode step whatever the row count, and on a GB10 the 48 layers' projections take 9.6 ms of a one-row step. Decode with one to four requests is bound by those reads. Kimi K3, Kimi K3.1 and Qwen3.8 already store such projections as MXFP8 under --online-mxfp8, which halves the bytes read.

The Inkling 2 recipe declares online MXFP8 conversion. With the flag, attention_weights in ignition/recipes/inkling2/attention.py converts every fused input projection and the output projection of every decoder layer, key and value rows included, with quantize_bf16_linear_as_mxfp8, and PreparedAttention projects through QuantizedProjection with BF16 activations in prefill, decode and verification. The output projection then writes BF16 partial sums in every mode. The weight loader allocates the BF16 sources as temporaries, the flag enters the tuning identity, and PreparationConfig carries it from the plan. Routers, vocabulary shards, convolutions, norms, clip scales, the relative-logit projection, experts, DSpark and the vision encoder keep checkpoint precision. Without the flag preparation is unchanged. Helios and the package contract are unchanged.

A rank reads 1.22 GB of attention projection weights per decode step and holds 1.14 GB less. The stored weights differ from the checkpoint's by 2.7% in relative norm, so generated text differs from a BF16-projection core's. An 8,192-row prefill projection is about 5% slower than with BF16 weights.

Evidence: on one GB10 with the checkpoint, the 48 layers' projections of one rank take 5.62 ms against 9.57 ms at one row, 5.58 against 9.81 at four rows, and 221.9 ms against 211.4 ms at 8,192 rows. With the Transformers reference layers over 1,536 positions of prose and source code, next-token accuracy is 65.6% with MXFP8 projections and 65.8% without, and the most likely token agrees at 97.3% of positions. tests/recipes/test_inkling2_target.py checks that the decode, verification and prefill kernels of a window and a global layer multiply by the stored values, and tests/cli/test_inkling2.py covers the flag. One core exported with the flag served at TP4 on four DGX Sparks with 32 requests and 8,192-token chunks: tests/server/test_inkling2.py -k default-effort passes 7 of 7, lookups at 18,832, 67,151 and 131,996 prompt tokens return the expected value in 26 of 26 requests, and each rank holds 3,604,480 KV tokens against 3,416,064. Over three repeats on one launch of each core, a one-token round takes 31.5 to 32.7 ms of GPU time with two requests against 35.4 to 36.7 ms, and 49.8 to 50.0 ms with four against 52.0 to 53.2 ms; time to first token at 131,990 prompt tokens is 43.5 to 43.7 s against 40.7 to 43.1 s. Limitations: one-request round time and decode throughput at one to four requests do not separate from the BF16 core within three repeats. Completions of 60 seeded lookups had a median of 472 tokens against 356, one sample set per core. On a GB10, one of eight runs of test_inkling2_target.py -k checkpoint_attention reported one failing case of 20, which was not identified.

5. Document switch-only RoCE routing for row-sharded Inkling 2 prefill on Sparks

Row-sharded Inkling 2 prefill on four DGX Sparks loses 110 ms of a 2,072 ms chunk to a few collectives that take 7 to 72 ms against a 2 ms median. With the default routing a rank reaches one peer over a direct cable and two through the switch, and both ConnectX-7 ports share the host's PCIe links. The switch marks ECN on the congested flows and the senders' DCQCN rate control throttles them; flows over the cables are never throttled. The serving guide gave no routing advice for this configuration.

docs/model-preparation.md states, in the Inkling 2 row-sharding section, that such a core is served with --roce-switch-only on every rank, with the mechanism and the measured effect. No code changes.

A reader serving Inkling 2 at TP4 on cabled and switched Sparks is told the flag that removes the stalled collectives.

Evidence: all four ranks of one core traced with node-level CUDA graph tracing over 67,000- and 132,000-token prompts. With the default routing, 90 collectives stalled in 32 chunks of 5,120 rows or more, hosts received 213,000 to 722,000 ECN-marked RoCE packets per 67,000-token prefill, and no CNP was counted on a cable port. With --roce-switch-only, no collective stalled in 36 such chunks and ECN, CNP and pause counters stayed at zero; chunks at the same position of the prompt were 92 ms (5.0%) shorter at 5,120 rows or more and 1.3% longer below, and a decode round was 0.08 to 0.09 ms longer. On untraced launches, time to first token at 131,990 tokens was 40.4 to 42.0 s against 43.5 to 43.7 s, three repeats each. Limitations: the two routings were measured on separate launches. The share of the stall caused by the shared PCIe links is inferred from pause and buffer-threshold counters; receive rate was not measured. Disabling ECN marking on the switch or DCQCN on the adapters was not tested.

6. Store Inkling 2 DSpark attention projections as MXFP8 with --online-mxfp8

An Inkling 2 drafting round reads the drafter's BF16 projections once whatever the number of drafts verified: the five draft layers' fused query/key/value and attention output projections and the recurrent head's context projection, 179 MB per TP4 rank. On a GB10 these kernels run at the memory rate (207 to 221 GB/s) and take about 0.85 ms of the 4.4 ms a round spends in the drafter and its proposal sampling. --online-mxfp8 already stores the target's attention projections as MXFP8; the drafter only proposes tokens, so its projections can take the same form without changing the output distribution.

With --online-mxfp8, DraftWeights.load converts each draft layer's fused query/key/value projection and attention output projection and the recurrent head's context projection with quantize_bf16_linear_as_mxfp8, and the drafter declares them through prepare_projection with BF16 activations. ignition/components/recurrent_proposal.py accepts an MXFP8 context weight; its projection is then rounded to BF16 before the FP32 bias and the previous draw's part are added. Each draft layer's key/value projection of accepted target taps keeps BF16 because it also runs on every prefill row, where MXFP8 weights with BF16 activations are slower. The recurrent state projection, embeddings, norms, the checkpoint's MXFP8 feed-forward weights and both proposal heads keep their precision. Without the flag preparation is unchanged. Helios and the package contract are unchanged.

A drafting round reads 92 MB of these weights per rank. Proposals and their acceptance rate may differ from a BF16 drafter's; target verification decides every emitted token.

Evidence: on a GB10 with the checkpoint, tests/components/ test_inkling2_dspark_cuda.py and test_inkling2_dspark.py pass 45 of 45, including a check that the converted projections of a window and a global draft layer multiply by the stored values, eagerly and compiled; test_inkling2_target.py -k checkpoint_attention passes 20 of 20 and test_inkling2_row_shards_cuda.py 6 of 6. One core exported with --online-mxfp8, --draft-head-quantization nvfp4 and --markov-head-quantization fp8 served at TP4 on four DGX Sparks with 32 requests: tests/server/test_inkling2.py -k default-effort passes 7 of 7 and 32 concurrent requests return the expected values. Over three repeats each, acceptance of the first and second draft was 78% and 62% on ordinary prompts against 79% and 61% for the core with a BF16 drafter and BF16 correction head, and 58% and 34% against 58% and 33% on an article continuation; three decode benchmark passes completed without errors with single-request decode of 48.0 to 51.3 tokens/s at an 8,192-token context against 41.8 to 43.0. Limitations: the drafter's kernel time was not traced on this core, and its one launch also ran one-token rounds and prefill faster than the earlier core's launches (22.5 ms against 24.2 to 28.8 ms at one request), so the throughput difference is not attributed to this change. The served core also used the FP8 correction head, so the acceptance comparison covers both together.

7. Store the Inkling 2 vocabulary head as MXFP8 with --online-mxfp8-scope with-vocabulary-head

Every Inkling 2 decode and verification round multiplies the final hidden rows by the rank's BF16 unembedding shard, 463 MB per TP4 rank. On a GB10 that projection runs at the memory rate and takes 1.89 ms of a 23.2 ms one-token round with one request, and it is paid once per round whatever the number of requests. --online-mxfp8 stores the attention and DSpark projections as MXFP8 and leaves this shard in BF16.

The Inkling 2 recipe declares two --online-mxfp8-scope groups. all, the default, is the existing conversion set, and a core exported with --online-mxfp8 alone records it. with-vocabulary-head also converts each rank's unembedding shard with mxfp8_draft_head and releases the BF16 rows after the drafter's proposal heads are derived from them. PreparedLogits and PreparedVocabularyProjection bind the packed shard through WidenedQuantizedProjection in ignition/components/vocabulary.py: b12x's A16 packed-weight kernel stores BF16, and the result is widened to FP32, so the softcap, the valid-vocabulary mask, the cross-rank gather, sampling, log-probabilities, resumed sampling and DSpark verification receive FP32 values in the layouts they have with a BF16 shard. Proposals read the drafter's quantized copy when it has one and otherwise the target's shard as stored; with --draft-head-quantization mxfp8 no duplicate is held. The scope enters the tuning identity and the rebuild manifest. No kernel, Helios code, Protobuf field or package contract changes.

With the group selected, a round reads 239 MB of vocabulary weights per rank and each logit is an FP32 sum rounded to BF16 before the softcap. Unlike a quantized proposal head, this changes the distribution that sampling and verification use. Cores exported without the group are unchanged.

Evidence: on a GB10, over the final hidden states of 1,536 positions of prose and source code, the MXFP8 shard's softcapped logits differ from the BF16 shard's by 0.084 on average and 0.93 at most at a softcap of 30; the most likely token agrees at 99.48% of positions, and at the eight others the BF16 shard's two largest logits are within 0.07; the KL divergence at temperature 1 has mean 3.6e-4 and maximum 7.7e-3; next-token accuracy is 60.33% against 60.39%. Rounding the BF16 shard's logits to BF16 alone gives 99.54% agreement and mean divergence 5.3e-5. With the checkpoint, tests/recipes/test_inkling2_target.py and test_inkling2_vocabulary_cuda.py -k checkpoint pass 30 of 30, the Inkling 2 CLI and planning tests pass 214 with the 2 failures the parent commit has, and the DSpark, sampling, commit, packed-speculation and draft-head component tests pass 178 with the parent's 11 failures, all of which need the qualification feature. One core exported with the group served at TP4 on four DGX Sparks with 32 requests and 8,192-token chunks: tests/server/test_inkling2.py -k default-effort passes 7 of 7, 32 concurrent requests return the expected values, and a 67,150-token lookup is correct at three seeds. A rank-0 kernel trace gives 0.94 ms for the vocabulary projection. One-token rounds take 22.2, 30.3 and 41.5 ms of GPU time at one, two and four requests against 22.4, 31.5 and 42.6 ms for the core exported from the parent commit. With a distinct sampling seed per stream, three decode benchmark passes against two give 67.1 to 67.6 tokens/s against 63.4 to 63.7 at two requests, 92.3 to 94.0 against 88.7 at four and 125.8 to 128.6 against 120.1 to 120.8 at eight, at an 8,192-token context, with the same order at 32,768 and 131,072 tokens; single-request decode is 44.9 to 48.0 against 42.5 to 51.6. Coding medians are 63.6, 47.1 and 67.7 tokens/s against 65.5 and 62.7. Limitations: the first export with the group failed when a compile worker could not create its CUDA context on rank 0 and an unchanged second export succeeded; host memory during both followed exports of the parent commit, and the cause is not established. Output quality beyond the logit comparison and the serving checks was not evaluated. Draft acceptance on article text was sampled on 46 offers.

8. Document serving Inkling 2 on Sparks with --mtp-adaptive-verification-alpha 0.5

With the default exponent of 1.0 on completed prefix-survival scores, the balanced scheduler serving Inkling 2 Small at TP4 on four DGX Sparks leaves drafting after one to three rejected first drafts: a request's estimates start at a weight of two and a rejection zeroes every deeper offered prefix. In one-token rounds nothing is observed, so the request returns only through an acceptance probe, and one request funds a probe about every 6 s. Of twelve sequential 25 s requests on task prompts, three spent 12 to 26 s in one-token rounds at 48 to 51 tokens/s although their first drafts were accepted 63% to 90% of the time once drafting, and single-request coding completions of 400 to 1,000 tokens ran either near 46 tokens/s or at 63 to 80.

docs/model-preparation.md recommends --mtp-adaptive-verification-alpha 0.5 for Inkling 2 on DGX Sparks and states what it trades. The flag exists; no code, default, or package changes.

With the exponent at 0.5 a request with high draft acceptance keeps drafting, and low-acceptance text is drafted more often than it repays.

Evidence: one core exported from the parent commit with --online-mxfp8-scope with-vocabulary-head, served at TP4 on four DGX Sparks with the balanced policy, one launch per exponent. Ten sequential coding completions with 0.5 generated 70.6 to 81.9 tokens/s, with drafts in 99% of rounds; fifteen with 1.0 generated 46.5 to 76.7. On task prompts ending at EOS, three 20 s repeats gave 98.2 tokens/s (97.9 to 100.8) at four requests against 89.2 (88.3 to 90.4), 88.1 (80.4 to 92.4) at two against 80.4 (67.3 to 88.7), and 65.2 (63.2 to 69.2) at one against 71.3 (63.1 to 75.1). On an article continuation the exponent drafted in 100%, 84% and 49% of rounds at one, two and four requests for 46.7, 65.2 and 92.1 tokens/s against 46.3, 68.1 and 95.1. Two decode benchmark passes at an 8,192-token context with a distinct seed per stream gave 48.7 and 46.3 tokens/s at one request, 71.6 and 68.3 at two, 91.8 and 93.9 at four and 128.8 and 129.9 at eight, against 45.1 to 45.6, 67.1 to 67.6, 92.3 to 94.0 and 125.8 to 128.6 over three passes with 1.0. An exponent of 0.75 kept single requests drafting and did not change four requests (89.5). Limitations: launches differ by 3% in one-token round time; the exponent was not measured on other models or at more than eight requests; the probe cadence that makes the default slow to return is unchanged.

The Inkling 2 Small NVFP4 recipe prepared only on four GPUs of one host: it
rejected a multi-host rendezvous, built its collectives on CUDA peer memory,
and admitted compute capability 12.0 alone. Each rank holds a quarter of the
344 GB checkpoint, which fits a DGX Spark (GB10, 121 GiB unified memory), so
four Sparks joined by RoCE can serve the model once the recipe places one rank
per host. The recipe follows the multi-host shape the DeepSeek V4 recipe uses
(51864a2, #240): host placement and the ring or chain choice travel in
PreparationConfig, and one RoCEnante runtime replaces the per-role peer-memory
channels when the rank group spans hosts. RoCEnante reductions carry BF16
only, so cross-host ranks round each partial sum to BF16 before reducing; the
single-host path keeps its FP32 reductions, because that precision is
available there and its prepared graphs must not change.

What changed, in ignition/recipes/inkling2. Before, recipe.prepare raised when
given `ranks` and always used process-local GPUs 0 through 3. Now, with
`ranks`, each rank uses GPU 0 of its own host, and hosts, roce_ring and
roce_chain flow from the plan into PreparationConfig, which requires four
distinct (host, GPU) placements and validates the routing shape with
ignition.planning.host_shape_error. bootstrap._collective_runtimes allocates
the channels: when the coordinator spans hosts, one RoCEnante runtime carries
the hidden reductions and the vocabulary, sampling and log-probability
gathers, sized from the decode rows, the drafter's block of every request, the
prefill chunk and each rank's vocabulary partition; otherwise it creates the
same all-reduce and all-gather peer-memory runtimes with the same arguments as
before. The shared runtime is closed once. decoder.reduction_dtype selects
BF16 for a RoCE runtime and FP32 otherwise, and the embedding, attention and
expert partial sums are cast to it before each reduction. prepare_rank admits
compute capability (12, 1) beside (12, 0); the exact check existed because the
recipe had been tested on RTX PRO 6000 alone. On an integrated GPU it releases
the checkpoint's page cache after loading weights, since unified memory counts
those pages against the GPU. The request limit stays 8 and the declared
defaults are unchanged. docs/model-preparation.md gives the four-host export,
join and serve commands and the qualified configuration, docs/roce-ring.md
lists the recipe among multi-host preparations, and docs/TODO.txt records the
unrun comparisons.

The result is that `ignition export --ranks 4` with three `ignition join`
peers prepares this recipe on four hosts, and `flare run` serves the core
across them. Single-host preparation builds the same channels and FP32
reductions as before.

Evidence, on four DGX Sparks (GB10, compute capability 12.1, one GPU each),
RoCE over ConnectX-7 with mesh routing, the checkpoint on rank zero only and
peers reading their tensor ranges from it (80.27 GiB each, about 2.3 Gbit/s).
Before this change the recipe rejected `ranks`. After it, a reduced core
(--no-mtp --language-model-only --max-concurrency 1 --prefill-chunk-size 512
--autotune-effort off --no-compile, no memory reserve) exported 8 graphs in
18 min 43 s and served across the four hosts: 82.91 GiB loaded per rank and a
24.5 GiB cache with 6,414,336 KV tokens. A chat completion, a streamed
completion (90 events), two requests against the one slot, and a 7,150-token
lookup prefilled in fourteen 512-token chunks returned the expected answers,
and SIGTERM shutdown completed in 3.5 s. The RoCE loss counters
(out_of_sequence, packet_seq_err, local_ack_timeout_err, rnr_nak_retry_err,
summed over sixteen ports) did not change during export or serving.
tests/recipes/test_inkling2_hosts.py (14 passed, CPU only) covers placement
and routing validation, the plan fitting four GB10 hosts, dispatch of the plan
to the rank group, the RoCE runtime's capacities, the unchanged peer-memory
channel arguments, and the reduction element type. With
tests/cli/test_inkling2.py, tests/cli/test_planning.py and
tests/recipes/test_declarations.py: 249 passed, 9 failed, 14 skipped; the
same three files on the parent commit give 235 passed, 14 skipped and the
same 9 failures (Qwen declaration assertions, a missing Kimi checkpoint
directory, DeepSeek V4.1 and Muse Spark collective-policy cases, and the
collective ladder round trip).

Limitations. An export of the declared eight-request configuration with
drafting, vision, tuning and compilation was started on the four Sparks and
stopped at graph construction after about seven minutes; it has not completed
there. Not run: a numerical comparison of BF16 cross-host reductions with
single-host FP32 output, the server tests of tests/server/test_inkling2.py on
Sparks, ring and chain routing, and single-host GPU preparation after this
change.

Design-Signed-Off-By: flare-02; design-review=ed22
The Inkling 2 Small NVFP4 recipe rejected more than eight concurrent requests:
PreparationConfig bounded the request capacity to [1, 8] and the recipe
declared max_concurrency=8. Four DGX Sparks hold enough memory beside the
weights for a 32-request core with 8192-token prefill chunks, and nothing in
the recipe depends on eight. Request slots, batch capacities, pool rows,
DSpark scratch, vision slots, gather rows, prefill scratch and the page count
already derive from the configured request count, so raising the bound is
sufficient and no capacity needed a separate change.

What changed. Before, bootstrap.PreparationConfig raised for max_active above
8 and planning rejected --max-concurrency above 8 for this recipe. Now the
bound is [1, 32] and the recipe declares max_concurrency=32. The default
concurrency (8), default prefill chunk (4096) and default verification
capacity (64 rows, 64-graph budget) are unchanged, so an export without flags
prepares the same catalog as before. tests/server/test_inkling2.py no longer
pins eight requests and 4096-token chunks: it accepts a service with at least
eight requests and 4096- or 8192-token chunks and scales its chunk-crossing
prompts with the chunk size the service reports. tests/cli/test_inkling2.py
asserts the declared maximum, and tests/recipes/test_inkling2_hosts.py adds
the 32-request bound, round shapes, RoCE capacities and planning fit.
docs/model-preparation.md documents the 32-request, 8192-token DGX Spark
configuration in place of the eight-request one, and docs/TODO.txt replaces
the pending eight-request Spark export with the planner estimate described
below.

The result is that the recipe prepares and serves up to 32 concurrent
requests. On four DGX Sparks the 32-request, 8192-token configuration with
seven drafts and vision exports, loads with 7.6 GiB or more available per
host, and answers 32 concurrent requests correctly. These are functional
results; no throughput was measured.

Evidence, on four DGX Sparks (GB10, 121 GiB unified memory each, one rank per
host, RoCE over ConnectX-7 with mesh routing). Before this change the
configuration could not be requested. After it, export with --max-concurrency
32 --image-concurrency 4 --prefill-chunk-size 8192 --mtp-draft-tokens 7
--speculative-token-capacity 128 --speculative-graph-budget 64
--autotune-effort default and a 4 GiB memory reserve took 1 h 25 min 30 s and
produced 152 graphs in a 351 GB core (350,544,415,417 bytes): kernel tuning
675 s, compilation 1,893 s, compiled warmup 586 s, capture 485 s, export
1,078 s. The lowest MemAvailable during export was 11.5, 12.6, 12.5 and
13.1 GiB on ranks 0 through 3, and the graph pool is 2,840 MiB per rank.
Verification capacity 128 with graph budget 64 is the value the DeepSeek V4.1
recipe declares for 32 requests and seven drafts. Serving loaded 90.06 to
90.24 GiB per rank. With the exported 4 GiB reserve the cache was 12.4 GiB
with 2,392,064 KV tokens and 78 shared snapshot slots, leaving 12.0 to
12.5 GiB MemAvailable. With --memory-limit=-0G it was 16.5 GiB with 3,252,224
KV tokens and 106 snapshot slots, leaving 7.76 to 8.26 GiB after loading and
7.64 GiB at the lowest sample during 32 concurrent requests. On that service,
tests/server/test_inkling2.py -k default-effort passed 7 cases: eight
concurrent requests, streamed reasoning, prefix reuse and branching across a
chunk, a tool call, a structured response, images across a chunk, and four
images with four concurrent image requests. 16 and 32 concurrent exact-repeat
requests were all correct, and a streamed completion succeeded. An
18,832-token lookup was answered correctly in four of four runs with a
2048-token output limit and in one of two runs with a 512-token limit; the
other run spent all 512 tokens in reasoning. Its cause was not investigated,
and docs/TODO.txt already records an intermittent long-prefix output-limit
failure for this recipe. The RoCE loss counters did not change and earlyoom,
the hosts' out-of-memory daemon, killed no process. CPU tests:
tests/recipes/test_inkling2_hosts.py 18 passed; with tests/cli/test_inkling2.py, tests/cli/test_planning.py and
tests/recipes/test_declarations.py, 253 passed, 9 failed, 14 skipped, the 9
failures being the ones the same files produce on main (Qwen declaration
assertions, a missing Kimi checkpoint directory, DeepSeek V4.1 and Muse Spark
collective-policy cases, and the collective ladder round trip).

Limitations. The planner estimated 22.9 GiB of KV pages per rank where
serving allocated 12.4 GiB at the same reserve; docs/TODO.txt records the
correction of the declared rank costs. Not run: the 32-request configuration
on RTX PRO 6000, a 16-request core, the eight-request configuration on DGX
Sparks, the effort-zero server cases, and benchmarks.

Design-Signed-Off-By: flare-02; design-review=ed22
When `flare run` starts a multi-host core, rank zero reads every peer's rank
core through the page cache and sends it over TCP. On a host whose GPU
allocates from system memory, such as a DGX Spark (GB10), those cached pages
are not free memory for CUDA, so the pages of several rank cores can keep rank
zero from creating its CUDA context. Helios already releases the page cache of
a rank's own core files before it creates the context
(Files::release_page_cache in helios/src/runtime_core/model.rs), and a
receiving rank syncs the files it writes; the files rank zero reads on behalf
of other ranks were never released. Releasing them where the distribution
source stops closes that gap with the same eos operation and needs no change
to loading or to the transfer protocol.

Before this change the distribution source in flare-cli/src/distribution.rs
returned when its serving threads had joined and left the pages it had read in
the cache. Now release_served_pages calls flare_eos::release_page_cache
(POSIX_FADV_DONTNEED on Linux, a no-op on Windows) on every file of ranks one
and above when the source thread finishes, whether distribution succeeded or
failed. Rank zero's own files are left to the existing release in Helios.
flare-cli gains a path dependency on the in-tree eos crate, which the lock
file records.

The result is that a rank-zero host returns the memory used to read peer
cores before GPU initialization, without a manual page-cache drop.

Evidence, on four DGX Sparks (121 GiB unified memory each, one rank per host)
serving a 351 GB four-rank Inkling 2 Small NVFP4 core. Before: after rank
zero distributed three rank cores, its host showed 114 GiB of page cache and
2 GiB free, and rank zero failed at "Initialize GPU" with CudaError {
operation: "cuCtxCreate_v2", code: 2, name: "CUDA_ERROR_OUT_OF_MEMORY" }. The
failure was intermittent: the first launch of a smaller core went through the
same distribution without it. After, with rebuilt binaries on all four hosts,
the peers' rank cores removed and no manual cache drop: three rank cores were
sent in 70.2 s, /proc/meminfo on rank zero at the end of distribution showed
MemAvailable 115.9 GiB and Cached 0.12 GiB, and GPU initialization succeeded.
The Linux test
source_releases_the_page_cache_of_peer_core_files_when_it_finishes serves a
4 MiB on-disk file to one peer and checks with mincore that the file has
resident pages after the transfer and none after the source finishes.
cargo test --release --manifest-path flare-cli/Cargo.toml distribution: 30
passed, 0 failed, 2 ignored (they need external fixtures). Not run: other
models, two- and three-rank cores, and hosts with discrete GPUs, where the
release changes only the page cache.

Design-Signed-Off-By: flare-02; design-review=ed22
…nd norm

Inkling 2 Small prefill on DGX Spark TP4 spent 994 ms of a 3,808 ms
8,192-row chunk in the expert router's projection, which widened its BF16
source and weight to FP32 so that only b12x's FP32-operand kernels were
eligible, and 376 ms in attention-residual mixtures that stored an FP32
mixture per stream for a separate RMSNorm launch. The router needs FP32
accumulation, not FP32 operands: the product of two BF16 values is exact
in FP32. The mixture and its norm read and write the same rows, so one
program can normalize without storing the mixture.

The router projection takes its BF16 source and a BF16 router weight and
declares accumulation="fp32", which UnquantizedProjection passes to b12x so
that only plans carrying the whole sum in FP32 are raced. The weight loader
delivers the FP32 checkpoint tensor as BF16 only after checking that every
value is an exact BF16 upcast. PreparedResidualMix normalizes each stream
in the mixture kernel with FP32 mean square, scale and weight and one
rounding to BF16; PreparedRMSNorm leaves this path. Prefill attention
writes its partial sum in the cross-rank reduction's element type, BF16
over RoCEnante and FP32 on one host, in place of FP32 followed by a cast;
decode and verification keep FP32.

Prefill time to first token on four DGX Sparks falls by a factor of 1.5 to
1.6. Router selection is unchanged in value class: operands are the same
numbers and only summation order differs. The fused norm differs from the
unfused one by at most one BF16 unit in at most ten elements per million.

Evidence: one exported core per tree served by flare run at TP4 on GB10,
8,192-row chunks, warm and uncached, three repeats. Time to first token
was 2.59 to 2.69 s at 7,668 prompt tokens (4.18 to 4.51 s before), 22.4 to
23.0 s at 67,145 (35.2 to 35.4 s) and 48.8 to 49.8 s at 131,990 (73.5 s).
The measured core also contained FlashInfer's swapped-operand FC1 selection
and the drafting changes, so the factor is not attributable to this commit
alone. In a kernel trace of rank 0, an 8,192-row chunk spans 2,509 ms with
routing at 159 ms and mixtures with norms at 247 ms. On one GB10 the
router projection for 8,192 rows takes 2.14 ms against 19.5 ms, with the
same top-8 experts on every row. tests/recipes/test_inkling2_target.py
passes 87 tests on a GB10 with the checkpoint, including attention against
the reference in prefill, decode and verification and the fused-norm bound.
Limitations: the projection requires GemvQuery.accumulation from FlashInfer
(local-inference-lab/flashinfer#110), which the pinned FlashInfer revision
lacks. Completion length was compared between a core from this tree with
the drafting changes and a core from the unmodified tree: over lookup
prompts with seeds 1 to 30, median completion tokens were 363 against 420
and the share at or above 1,024 tokens differed by -1.7 points (95%
interval -7.2 to +3.8), with no wrong answer in 540 and 480 responses.
tests/server/test_inkling2.py's prefix-reuse case, which fixes one seed
and a 1,024-token limit, fails in 9 of 20 repeats on the changed core and
5 of 20 on the unmodified one. Single-host RTX PRO 6000 serving was not
run.

Design-Signed-Off-By: flare-02; design-review=ed22
… formats

On DGX Spark TP4 a drafting round of Inkling 2 Small cost about 39 ms plus
4.5 ms per verified draft against a 28 ms decode step, so 11 ms of each
round bought no tokens and the balanced policy rarely chose to draft.
Verification staged each sliding-window layer's history with PyTorch
gathers over whole rings and committed accepted rows by rewriting whole
rings, the recurrent head projected its draw-independent context once per
draft position, and proposal heads read BF16 only. These costs do not
depend on the draws or on the number of drafts, so they can leave the
per-round path without changing what verification computes.

Verification attention stages each request's preceding window and its
candidate rows with one PreparedWindowStaging kernel per layer and commits
accepted rows with one PreparedRingCommit kernel. PreparedWindowStaging
gains lookback, the count of preceding positions staged from a ring that
retains more than attention reads, and PreparedRingCommit gains
candidate_offset, the record index at which staged candidates start; both
default to their earlier meaning. The recurrent proposal head projects the
block's states and target context once per block, proposals read one
embedding row per request, and staging plans are shared between layers.
--draft-head-quantization nvfp4 or mxfp8 and --markov-head-quantization fp8
prepare proposal-only copies computed from checkpoint values at load;
target verification keeps the BF16 head, so they change which tokens are
proposed, never the output distribution. Both flags default to omitted.

A drafting round at one request costs about 34.7 ms plus 4.7 ms per
verified draft: the fixed cost over a decode step falls from about 11 ms
to about 6 ms and the per-draft cost is unchanged. The preparation graph
pool falls from 2,840 MiB to 2,092 MiB per rank.

Evidence: one exported core per tree served by flare run at TP4 on GB10,
one request, ordinary prompts, a fresh launch per verification row budget.
Rounds verifying 2 to 8 target rows took 39.3, 45.0, 49.9, 54.4, 58.9,
62.1 and 67.3 ms against 43.7, 48.5, 53.2, 57.4, 61.6, 67.1 and 70.5 ms.
Drafting rounds took 215 to 248 ms at 16 requests (237 to 272 ms) and
279 ms at 32 (342 to 461 ms). The measured core used
--draft-head-quantization nvfp4; acceptance at draft depths 1 to 4 was 81,
63, 48 and 35% on ordinary prompts against 79, 61, 48 and 36% with the
BF16 head, so the NVFP4 head neither raised nor lowered acceptance. The
measured core also contained the prefill changes of the preceding commit.
On a GB10 with the checkpoint, test_inkling2_target.py (87),
test_inkling2_window.py (9) and test_inkling2_dspark_cuda.py (15) pass,
covering verification attention against the reference and staged and
committed rings against PyTorch. Limitations: verification staging
requires WindowStageKernel's lookback from FlashInfer
(local-inference-lab/flashinfer#112), which the pinned revision lacks.
--markov-head-quantization fp8 and the MXFP8 draft head were not measured
in serving. Aggregate decode throughput is within a few percent of the
unmodified tree. lookback and candidate_offset extend two existing
component contracts with defaulted parameters; no graph kind is added.

Design-Signed-Off-By: flare-02; design-review=ed22
Between two cross-host reductions, an Inkling 2 decoder layer computes
stages whose result for a row depends on that row or on the three rows
before it: the attention-residual mixtures with their norms, the output
convolutions, the expert router and the residual additions. In tensor-
parallel prefill every rank computed them for every row of the chunk. On
one GB10 they take 773 ms of an 8,192-row chunk, and four ranks produce
four identical copies. RoCEnante's pipelined all-reduce is a reduce-
scatter followed by a shard gather, so a rank can keep its quarter of the
rows after the first half, compute these stages for those rows only, and
gather where every rank needs every row, at the wire bytes of the
all-reduce it replaces.

Prefill graphs of at least 2,048 rows on ranks that reduce over RoCEnante
shard their rows (SHARDED_PREFILL_ROWS in the Inkling 2 decoder).
PreparedReduceScatter and PreparedShardGather in
ignition/components/collectives.py prepare the two halves of the pipelined
all-reduce as separate captured operations. ignition/components/
row_shards.py holds row ownership, each rank's view of the batch
metadata, a column gather that exchanges the three rows before each
rank's rows and each request's last three rows after every reduce-scatter
(the output convolutions and their replicated histories read them), and
PreparedRouteGather, which carries each row's int32 expert IDs and FP32
route weights as bytes in BF16 lanes. The decoder's layer loop and final
mixture move into PreparedStack; in a sharded graph the residual state
holds a rank's rows, and shard gathers supply the attention input streams,
the expert input, the drafter taps and the final normalized rows. Row
ownership follows graph capacity, so a rank whose rows are padding
computes inactive rows. Smaller prefill graphs, decode, verification and
ranks on one host are unchanged. Helios and the package contract are
unchanged; a core gains sharded prefill when it is exported again.

A sharded 8,192-row chunk computes the row-local stages once across the
four ranks and runs 361 collectives where the replicated chunk runs 97.
Every row-local value, route, gathered row and convolution history equals
the replicated forward bit for bit.

Evidence: on one GB10 with the checkpoint, the row-local stages of 48
layers take 175.7 ms for a rank's shard against 773.4 ms for 8,192 rows,
and 37.5 ms against 173.3 ms at 2,048 rows, with no differing element.
tests/components/test_row_shards.py (41 tests) covers ownership, halo and
tail selection and capacity checks; tests/recipes/
test_inkling2_row_shards_cuda.py (6 tests) compares four ranks' sharded
forwards of a five-layer stack with the replicated stack through an
in-process exchange, eagerly and through a compiled, captured and replayed
forward, on an RTX PRO 6000 and a GB10; tests/recipes/
test_inkling2_target.py passes 87 tests on a GB10. One core exported from
this tree with FlashInfer 4fd836dc plus the FlashInfer changes this
branch's parents require served at TP4 on four DGX Sparks with 8,192-row
chunks: tests/server/test_inkling2.py -k default-effort passes 7 of 7 and
32 concurrent requests complete. Over three service launches, time to
first token was 2.07 to 2.34 s at 7,668 prompt tokens, 18.4 to 20.1 s at
67,145 and 40.7 to 43.1 s at 131,990, three repeats each; one launch of
the core exported from the parent commit measured 2.59 to 2.69 s, 22.4 to
23.0 s and 48.8 to 49.8 s. In kernel traces of rank 0, a 7,168-row chunk
spans 1,809 ms sharded against 2,034 ms replicated: collectives 586 ms
against 508 ms, mixtures and norms 70 ms against about 216 ms.
Limitations: a fourth launch of the sharded core ran every graph, decode
included, about 10% slower (2.85 to 2.96 s and 48.8 to 53.8 s) for a
cause that was not identified, and the replicated core was measured on
one launch, so the serving comparison does not exclude a launch effect of
that size. Capacities between 2,048 and 8,192 rows are not measured in
serving; the threshold is an estimate.

Design-Signed-Off-By: flare-02; design-review=ed22
An Inkling 2 decoder layer projects its input by a fused BF16 weight (query,
output gate, key, value, relative-bias factors and sink logits) and its
attention result by a BF16 output weight. At TP4 a rank reads 2.36 GB of
these weights in every decode step whatever the row count, and on a GB10
the 48 layers' projections take 9.6 ms of a one-row step. Decode with one
to four requests is bound by those reads. Kimi K3, Kimi K3.1 and Qwen3.8
already store such projections as MXFP8 under --online-mxfp8, which halves
the bytes read.

The Inkling 2 recipe declares online MXFP8 conversion. With the flag,
attention_weights in ignition/recipes/inkling2/attention.py converts every
fused input projection and the output projection of every decoder layer,
key and value rows included, with quantize_bf16_linear_as_mxfp8, and
PreparedAttention projects through QuantizedProjection with BF16
activations in prefill, decode and verification. The output projection
then writes BF16 partial sums in every mode. The weight loader allocates
the BF16 sources as temporaries, the flag enters the tuning identity, and
PreparationConfig carries it from the plan. Routers, vocabulary shards,
convolutions, norms, clip scales, the relative-logit projection, experts,
DSpark and the vision encoder keep checkpoint precision. Without the flag
preparation is unchanged. Helios and the package contract are unchanged.

A rank reads 1.22 GB of attention projection weights per decode step and
holds 1.14 GB less. The stored weights differ from the checkpoint's by
2.7% in relative norm, so generated text differs from a BF16-projection
core's. An 8,192-row prefill projection is about 5% slower than with BF16
weights.

Evidence: on one GB10 with the checkpoint, the 48 layers' projections of
one rank take 5.62 ms against 9.57 ms at one row, 5.58 against 9.81 at
four rows, and 221.9 ms against 211.4 ms at 8,192 rows. With the
Transformers reference layers over 1,536 positions of prose and source
code, next-token accuracy is 65.6% with MXFP8 projections and 65.8%
without, and the most likely token agrees at 97.3% of positions.
tests/recipes/test_inkling2_target.py checks that the decode, verification
and prefill kernels of a window and a global layer multiply by the stored
values, and tests/cli/test_inkling2.py covers the flag. One core exported
with the flag served at TP4 on four DGX Sparks with 32 requests and
8,192-token chunks: tests/server/test_inkling2.py -k default-effort passes
7 of 7, lookups at 18,832, 67,151 and 131,996 prompt tokens return the
expected value in 26 of 26 requests, and each rank holds 3,604,480 KV
tokens against 3,416,064. Over three repeats on one launch of each core, a
one-token round takes 31.5 to 32.7 ms of GPU time with two requests
against 35.4 to 36.7 ms, and 49.8 to 50.0 ms with four against 52.0 to
53.2 ms; time to first token at 131,990 prompt tokens is 43.5 to 43.7 s
against 40.7 to 43.1 s. Limitations: one-request round time and decode
throughput at one to four requests do not separate from the BF16 core
within three repeats. Completions of 60 seeded lookups had a median of 472
tokens against 356, one sample set per core. On a GB10, one of eight runs
of test_inkling2_target.py -k checkpoint_attention reported one failing
case of 20, which was not identified.

Design-Signed-Off-By: flare-02; design-review=ed22
…n Sparks

Row-sharded Inkling 2 prefill on four DGX Sparks loses 110 ms of a 2,072 ms
chunk to a few collectives that take 7 to 72 ms against a 2 ms median. With
the default routing a rank reaches one peer over a direct cable and two
through the switch, and both ConnectX-7 ports share the host's PCIe links.
The switch marks ECN on the congested flows and the senders' DCQCN rate
control throttles them; flows over the cables are never throttled. The
serving guide gave no routing advice for this configuration.

docs/model-preparation.md states, in the Inkling 2 row-sharding section,
that such a core is served with --roce-switch-only on every rank, with the
mechanism and the measured effect. No code changes.

A reader serving Inkling 2 at TP4 on cabled and switched Sparks is told the
flag that removes the stalled collectives.

Evidence: all four ranks of one core traced with node-level CUDA graph
tracing over 67,000- and 132,000-token prompts. With the default routing,
90 collectives stalled in 32 chunks of 5,120 rows or more, hosts received
213,000 to 722,000 ECN-marked RoCE packets per 67,000-token prefill, and no
CNP was counted on a cable port. With --roce-switch-only, no collective
stalled in 36 such chunks and ECN, CNP and pause counters stayed at zero;
chunks at the same position of the prompt were 92 ms (5.0%) shorter at
5,120 rows or more and 1.3% longer below, and a decode round was 0.08 to
0.09 ms longer. On untraced launches, time to first token at 131,990
tokens was 40.4 to 42.0 s against 43.5 to 43.7 s, three repeats each.
Limitations: the two routings were measured on separate launches. The
share of the stall caused by the shared PCIe links is inferred from pause
and buffer-threshold counters; receive rate was not measured. Disabling
ECN marking on the switch or DCQCN on the adapters was not tested.

Design-Signed-Off-By: flare-02; design-review=ed22
…xfp8

An Inkling 2 drafting round reads the drafter's BF16 projections once
whatever the number of drafts verified: the five draft layers' fused
query/key/value and attention output projections and the recurrent head's
context projection, 179 MB per TP4 rank. On a GB10 these kernels run at
the memory rate (207 to 221 GB/s) and take about 0.85 ms of the 4.4 ms a
round spends in the drafter and its proposal sampling. --online-mxfp8
already stores the target's attention projections as MXFP8; the drafter
only proposes tokens, so its projections can take the same form without
changing the output distribution.

With --online-mxfp8, DraftWeights.load converts each draft layer's fused
query/key/value projection and attention output projection and the
recurrent head's context projection with quantize_bf16_linear_as_mxfp8,
and the drafter declares them through prepare_projection with BF16
activations. ignition/components/recurrent_proposal.py accepts an MXFP8
context weight; its projection is then rounded to BF16 before the FP32
bias and the previous draw's part are added. Each draft layer's key/value
projection of accepted target taps keeps BF16 because it also runs on
every prefill row, where MXFP8 weights with BF16 activations are slower.
The recurrent state projection, embeddings, norms, the checkpoint's MXFP8
feed-forward weights and both proposal heads keep their precision. Without
the flag preparation is unchanged. Helios and the package contract are
unchanged.

A drafting round reads 92 MB of these weights per rank. Proposals and
their acceptance rate may differ from a BF16 drafter's; target
verification decides every emitted token.

Evidence: on a GB10 with the checkpoint, tests/components/
test_inkling2_dspark_cuda.py and test_inkling2_dspark.py pass 45 of 45,
including a check that the converted projections of a window and a global
draft layer multiply by the stored values, eagerly and compiled;
test_inkling2_target.py -k checkpoint_attention passes 20 of 20 and
test_inkling2_row_shards_cuda.py 6 of 6. One core exported with
--online-mxfp8, --draft-head-quantization nvfp4 and
--markov-head-quantization fp8 served at TP4 on four DGX Sparks with 32
requests: tests/server/test_inkling2.py -k default-effort passes 7 of 7
and 32 concurrent requests return the expected values. Over three repeats
each, acceptance of the first and second draft was 78% and 62% on
ordinary prompts against 79% and 61% for the core with a BF16 drafter and
BF16 correction head, and 58% and 34% against 58% and 33% on an article
continuation; three decode benchmark passes completed without errors with
single-request decode of 48.0 to 51.3 tokens/s at an 8,192-token context
against 41.8 to 43.0. Limitations: the drafter's kernel time was not
traced on this core, and its one launch also ran one-token rounds and
prefill faster than the earlier core's launches (22.5 ms against 24.2 to
28.8 ms at one request), so the throughput difference is not attributed
to this change. The served core also used the FP8 correction head, so the
acceptance comparison covers both together.

Design-Signed-Off-By: flare-02; design-review=ed22
…e with-vocabulary-head

Every Inkling 2 decode and verification round multiplies the final hidden
rows by the rank's BF16 unembedding shard, 463 MB per TP4 rank. On a GB10
that projection runs at the memory rate and takes 1.89 ms of a 23.2 ms
one-token round with one request, and it is paid once per round whatever
the number of requests. --online-mxfp8 stores the attention and DSpark
projections as MXFP8 and leaves this shard in BF16.

The Inkling 2 recipe declares two --online-mxfp8-scope groups. `all`, the
default, is the existing conversion set, and a core exported with
--online-mxfp8 alone records it. `with-vocabulary-head` also converts each
rank's unembedding shard with mxfp8_draft_head and releases the BF16 rows
after the drafter's proposal heads are derived from them. PreparedLogits
and PreparedVocabularyProjection bind the packed shard through
WidenedQuantizedProjection in ignition/components/vocabulary.py: b12x's
A16 packed-weight kernel stores BF16, and the result is widened to FP32,
so the softcap, the valid-vocabulary mask, the cross-rank gather, sampling,
log-probabilities, resumed sampling and DSpark verification receive FP32
values in the layouts they have with a BF16 shard. Proposals read the
drafter's quantized copy when it has one and otherwise the target's shard
as stored; with --draft-head-quantization mxfp8 no duplicate is held. The
scope enters the tuning identity and the rebuild manifest. No kernel,
Helios code, Protobuf field or package contract changes.

With the group selected, a round reads 239 MB of vocabulary weights per
rank and each logit is an FP32 sum rounded to BF16 before the softcap.
Unlike a quantized proposal head, this changes the distribution that
sampling and verification use. Cores exported without the group are
unchanged.

Evidence: on a GB10, over the final hidden states of 1,536 positions of
prose and source code, the MXFP8 shard's softcapped logits differ from the
BF16 shard's by 0.084 on average and 0.93 at most at a softcap of 30; the
most likely token agrees at 99.48% of positions, and at the eight others
the BF16 shard's two largest logits are within 0.07; the KL divergence at
temperature 1 has mean 3.6e-4 and maximum 7.7e-3; next-token accuracy is
60.33% against 60.39%. Rounding the BF16 shard's logits to BF16 alone
gives 99.54% agreement and mean divergence 5.3e-5. With the checkpoint,
tests/recipes/test_inkling2_target.py and test_inkling2_vocabulary_cuda.py
-k checkpoint pass 30 of 30, the Inkling 2 CLI and planning tests pass 214
with the 2 failures the parent commit has, and the DSpark, sampling,
commit, packed-speculation and draft-head component tests pass 178 with
the parent's 11 failures, all of which need the qualification feature. One
core exported with the group served at TP4 on four DGX Sparks with 32
requests and 8,192-token chunks: tests/server/test_inkling2.py -k
default-effort passes 7 of 7, 32 concurrent requests return the expected
values, and a 67,150-token lookup is correct at three seeds. A rank-0
kernel trace gives 0.94 ms for the vocabulary projection. One-token rounds
take 22.2, 30.3 and 41.5 ms of GPU time at one, two and four requests
against 22.4, 31.5 and 42.6 ms for the core exported from the parent
commit. With a distinct sampling seed per stream, three decode benchmark
passes against two give 67.1 to 67.6 tokens/s against 63.4 to 63.7 at two
requests, 92.3 to 94.0 against 88.7 at four and 125.8 to 128.6 against
120.1 to 120.8 at eight, at an 8,192-token context, with the same order at
32,768 and 131,072 tokens; single-request decode is 44.9 to 48.0 against
42.5 to 51.6. Coding medians are 63.6, 47.1 and 67.7 tokens/s against 65.5
and 62.7. Limitations: the first export with the group failed when a
compile worker could not create its CUDA context on rank 0 and an
unchanged second export succeeded; host memory during both followed
exports of the parent commit, and the cause is not established. Output
quality beyond the logit comparison and the serving checks was not
evaluated. Draft acceptance on article text was sampled on 46 offers.

Design-Signed-Off-By: flare-02; design-review=ed22
…-alpha 0.5

With the default exponent of 1.0 on completed prefix-survival scores, the
balanced scheduler serving Inkling 2 Small at TP4 on four DGX Sparks
leaves drafting after one to three rejected first drafts: a request's
estimates start at a weight of two and a rejection zeroes every deeper
offered prefix. In one-token rounds nothing is observed, so the request
returns only through an acceptance probe, and one request funds a probe
about every 6 s. Of twelve sequential 25 s requests on task prompts, three
spent 12 to 26 s in one-token rounds at 48 to 51 tokens/s although their
first drafts were accepted 63% to 90% of the time once drafting, and
single-request coding completions of 400 to 1,000 tokens ran either near
46 tokens/s or at 63 to 80.

docs/model-preparation.md recommends --mtp-adaptive-verification-alpha 0.5
for Inkling 2 on DGX Sparks and states what it trades. The flag exists;
no code, default, or package changes.

With the exponent at 0.5 a request with high draft acceptance keeps
drafting, and low-acceptance text is drafted more often than it repays.

Evidence: one core exported from the parent commit with
--online-mxfp8-scope with-vocabulary-head, served at TP4 on four DGX
Sparks with the balanced policy, one launch per exponent. Ten sequential
coding completions with 0.5 generated 70.6 to 81.9 tokens/s, with drafts
in 99% of rounds; fifteen with 1.0 generated 46.5 to 76.7. On task prompts
ending at EOS, three 20 s repeats gave 98.2 tokens/s (97.9 to 100.8) at
four requests against 89.2 (88.3 to 90.4), 88.1 (80.4 to 92.4) at two
against 80.4 (67.3 to 88.7), and 65.2 (63.2 to 69.2) at one against 71.3
(63.1 to 75.1). On an article continuation the exponent drafted in 100%,
84% and 49% of rounds at one, two and four requests for 46.7, 65.2 and
92.1 tokens/s against 46.3, 68.1 and 95.1. Two decode benchmark passes at
an 8,192-token context with a distinct seed per stream gave 48.7 and 46.3
tokens/s at one request, 71.6 and 68.3 at two, 91.8 and 93.9 at four and
128.8 and 129.9 at eight, against 45.1 to 45.6, 67.1 to 67.6, 92.3 to
94.0 and 125.8 to 128.6 over three passes with 1.0. An exponent of 0.75
kept single requests drafting and did not change four requests (89.5).
Limitations: launches differ by 3% in one-token round time; the exponent
was not measured on other models or at more than eight requests; the
probe cadence that makes the default slow to return is unchanged.

Design-Signed-Off-By: flare-02; design-review=ed22
@original-el8 original-el8 added area:kernels GPU kernels and numerical execution. area:preparation Ignition checkpoint loading, tuning, compilation, capture, and export. performance Performance, latency, throughput, or memory-efficiency investigation or improvement. triage:validation Proposed implementation needs acceptance evidence; no claim that a reported defect is fixed. labels Nov 18, 2026
@original-el8
original-el8 marked this pull request as ready for review November 19, 2026 14:05

@yatesdr yatesdr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for marking this ready. A few clarifications and changes before it can merge; restricted GPU code, so these are findings only.

  1. Pin. The description says the commits need local-inference-lab/flashinfer #110, #111 and #112, which the pinned revision 4fd836dc lacks, and ignition/components/linear.py:178-179 passes accumulation= to bf16_gemv.query_from_call, which that revision does not accept, so Inkling 2 preparation stops at the router projection on the current pin. Is the intent to review now and merge after the pin moves? If so, the pin update belongs in this PR or a stated predecessor.
  2. One outcome per PR. The change covers row-sharded prefill, BF16 router operands, MXFP8 attention, drafting-round cost, proposal-head formats and an MXFP8 vocabulary head (+2,850/-334 in 34 files), and the description is the eight commit messages in sequence. AGENTS.md asks for one coherent outcome. Results measured on the combined core are also stated per commit: the 1.5 to 1.6 times shorter time to first token in the first section was measured with #111 and the drafting changes included. Could the vocabulary-head and drafting changes be separate PRs, each with its own result?
  3. Open differences. The prefix-reuse case in tests/server/test_inkling2.py fails in 9 of 20 repeats on the changed core against 5 of 20 on the unmodified one; median completion length moves from 420 to 363 tokens with the drafting changes and from 356 to 472 with MXFP8 attention, each from one sample set. Please give the cause, or list them in docs/TODO.txt as unresolved.
  4. Precision changes. --online-mxfp8-scope with-vocabulary-head changes the target distribution (most likely token agrees 99.48 percent, logit error up to 0.93), and on a single host --online-mxfp8 rounds attention partials to BF16 before the FP32 reduction (ignition/recipes/inkling2/attention.py); the description says output quality beyond those checks was not evaluated and single-host serving was not run. Please add an evaluation, or state the limits where the flags are documented.
  5. Row-shard test. tests/recipes/test_inkling2_row_shards_cuda.py uses the production row-shard collectives but replaces the RoCEnante transport with an in-process group and attention and the experts with synthetic functions, so the RoCE reduce-scatter and shard gather themselves are not exercised against the all-reduce result. SHARDED_PREFILL_ROWS = 2048 is also an estimate; serving was measured at 8,192 rows only.
  6. Docs. For --draft-head-quantization, docs/cli-design.md says "Inkling 2 Small NVFP4 supports both" formats, but the MXFP8 draft head was not measured in serving and the CUDA test covers None and nvfp4 only. Much of the added text in docs/model-preparation.md is run results (per-launch ranges, counter readings) that belong in the PR description.
  7. Trailers and contact. None of the eight commits has Signed-off-by (CONTRIBUTING.md), and the description needs the Discord: line (AGENTS.md, "Contact on PRs and issues"). The Design-Signed-Off-By digests match docs/design-review.md at their parents; a rebase onto main needs a new acknowledgment, since that file changed.

@original-el8
original-el8 force-pushed the inkling2/dgx-spark-tp4 branch from 803d626 to 9ffa8cd Compare November 20, 2026 18:17
@original-el8

Copy link
Copy Markdown
Collaborator Author

Repository-split triage: this PR spans both repositories and remains open for its runtime changes.

  • hyperflare-recipes: the Inkling prefill/drafting implementation and model components.
  • This runtime repository: the collective interfaces and CLI/distribution changes.

The recipe portion needs a linked PR against the hyperflare_recipes/ package, with its tests and validation evidence carried over. The runtime portion can remain here after removing recipe-owned files.

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

Labels

area:kernels GPU kernels and numerical execution. area:preparation Ignition checkpoint loading, tuning, compilation, capture, and export. performance Performance, latency, throughput, or memory-efficiency investigation or improvement. triage:validation Proposed implementation needs acceptance evidence; no claim that a reported defect is fixed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants