Repository navigation
scheduler: a pair under expert TP may verify one draft (prose +5.8% on 2x DGX Spark) - #346
Conversation
In multi-rank worlds the GLM vision tower sizes its scratch for the processor's whole budget (GlmCapacity::budgets: 120,000 patches, one video temporal group). That is 1.25 GiB held for the life of the process on the encoding rank, and since the KV pool is the minimum across ranks it costs every rank the same number of blocks. The tower only runs between prefill passes, so the scratch now comes from the BufferArena instead. The arena's 15 per-pass members (FP8 activations, router and gate logits, QKV/attention/norm/MoE outputs, SSM and expert intermediates) are carved from one allocation (buffers/lend.rs), and the encoding rank lends that span to the tower: - lend(): device-wide sync, then hand out the span's base. - return_lent(): zero only the borrowed bytes that overlap members decode expects zeroed, then wait on the encode stream. The four members the arena never zeroes sit first in the span, so the borrow's first bytes need no memset. Every encode call site (prefill and the vision cache head) goes through vision_forward_items(). When the span is smaller than the tower's scratch, the factory falls back to a private allocation, which is the old behaviour. total_bytes() accounts for the aligned span. GLM-5.3-Flash FP4-Local, TP=2 on two GB10s, 4x1M profile, util 0.91: the KV pool goes from 116,958-122,639 to 142,988-144,780 blocks (+19%). Vision output is identical to the owned-scratch build (images and a 19K-token video, alone and mixed with text decodes, every token logprob), greedy text and prompt logprobs are identical, and text decode is level. Image TTFT is about 20 ms (0.7%) higher from the sync and memset around each encode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
norm_output is now carved from the arena's per-pass span, which is freed once through its base, so the teardown-order check looks for the span. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The confidence width rule never verified one draft on the pair, because a lone owner's 2-row verify was priced 10.3 ms over its 3-row one. That was the 2026-09-28 sweep of the fused two-row path, which expert TP retired. On SparkGLM 0.3.2 (TP2, prose, ATLAS_DFLASH_FIXED_WIDTH=1, 2026-11-11) a 2-row verify takes 42.0 ms against 47.4 for 3 rows, and 46% of prose steps accept no draft. The pair now prices 2 rows on the same 5.68 ms line, so an unsure block verifies one draft. The chain has not been re-measured and keeps the charge. Verification stays exact at any width. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…line Review: the non-chain branch also serves a single GPU and a pair without expert TP, which still run the fused two-row path the 10.3 ms charge was measured on. The row-line price now needs the pair under expert TP (set at startup with the topology); everything else keeps the charge, and the width tests keep their expectations. Co-Authored-By: Claude Fable 5.2 <[email protected]>
343c445 to
7ea9aec
Compare
|
Restacked: the four GLM PRs are now one linear stack on main
Pre-push checks on the stack top: fmt, Pair gate on 2× GB10 is running now: GLM-5.3-Flash FP4-Local, the SparkGLM 0.3.2 4x1m spark launch with KV shard at 0.91, each PR's binary against its parent's. Results will follow here. Generated with Devin |
|
@data-angel pair gate for #346: passed. Merging after this comment. Setup: 2× GB10 (reiner + spark2). Each arm is a fresh build at an exact commit: parent = #338
The prose gain we observed (+2.8%) is about half your RigMark +5.8%. Our cell is a different harness: sq_bench, 384 tokens, Qwen: this change only re-prices the pair under expert TP. The Qwen pair receipt from 11-11 (same patch on the old base: KL 0 / 34,245 positions, bench level) covers it, so we didn't re-run it. Generated with Devin |
On a two-Spark pair, the confidence width rule never verified a single draft. A lone sequence's 2-row verify was priced 10.3 ms above its 3-row one, a 2026-09-28 measurement of the fused two-row path. Under expert TP that path no longer runs: a 2-row verify takes the same grouped path as a 3-row one.
Measured on SparkGLM 0.3.2 (GLM-5.3-Flash, TP-2, prose,
ATLAS_DFLASH_FIXED_WIDTH=1): 2 rows 42.0 ms, 3 rows 47.4 ms. About 45% of prose steps accept no draft, so the narrow step pays.Change
Result (2x DGX Spark, RigMark, 3 runs of 4,096 tokens)
Greedy output on 8 prompts and prompt log-probabilities are identical to the build without the change.
Tests
cargo test -p spark-server --bin spark dflashpasses (the existing width tests keep their expectations; one new assertion covers the pair's row line).🤖 Generated with Claude Code