Manuscript Offprint
arXiv:2611.02501SpecPilot: Autonomous Algorithm Discovery and Systems Optimization for Speculative Decoding
Berkeley UNIVERSITY OF CALIFORNIA
PRINCETON UNIVERSITY
Stanford University
NVIDIA
SpecPilot: Autonomous Algorithm Discovery and Systems Optimization for Speculative Decoding
Kunjun Li¹*, Wenhao Chai²*, Yihao Liang²*, Yuezhou Hu¹, Shuyao Xu³, Yi Pan¹, William X. Zheng¹, Kannan Ramchandran¹, Kurt Keutzer¹ and Jiantao Jiao¹,⁴
¹University of California, Berkeley, ²Princeton University, ³Stanford University, ⁴NVIDIA
- Equal contribution. Corresponding Author: jiantaoj@nvidia.com
Website: Specpilot-Project-Page Code: SpecPilot
Abstract
Speculative decoding accelerates memory-bound LLM decoding with a lightweight drafter, and parallel drafters extend this speedup by drafting a whole block in one forward pass. However, it remains unclear whether their released systems (stock) attain the full speedup that parallel drafting permits. We identify three challenges. First, with one request, each step accepts few tokens but reads every target weight. Second, with batching, per-request verification work roughly halves the speedup over autoregressive (AR) decoding. Third, speculative decoding is deployment-specific, and no universal optimization fits every serving regime, drafter, target model and GPU. To address these challenges, we present SpecPilot, an autonomous agentic loop that discovers algorithms and systems optimizations for each deployment. In each round, a cost model locates the largest gaps between the current system and its ceiling. Parallel agents explore directions and integrate the successful ones. Token forcing checks every output token against stock to detect reward hacking. A structured memory carries validated mechanisms to new rounds and deployments. SpecPilot discovered a general lossless 12-bit weight format, tree verification for hybrid recurrent targets, two-level verification and three batching mechanisms. We evaluate it across four target models, three drafters, two GPU platforms and five benchmarks. Without training or quality loss, it raises the speedup over AR from stock's 4.46× to 10.87× with one request, and from 1.94× to 3.93× with batching.
However, their released systems (stock) leave much of this potential unrealized. With one request, reading the target weights dominates the per-step latency (Figure 2a), so verifying additional tokens adds little extra latency. Stock still verifies only one drafted chain, ignoring the other candidates that its drafter ranks at each position, which often include the target's next token. Using them would accept about twice as many tokens per step (§3.1). With batching, each request adds its own attention, recurrent-state and prefill work, so weight reads no longer dominate the step, and stock's speedup over AR decoding roughly halves (Figure 2b).
Existing techniques such as draft trees [7–10] and batch-aware speculation [11–13] are general, but the best choice depends on the deployment. A deployment comprises a serving regime, a drafter, a target and a GPU platform, and each changes what pays off. The serving regime can turn a gain into a loss. Checking drafts with a low-precision target copy before the exact pass

Figure 1: Speedup over AR with one request. SpecPilot more than doubles stock's speedup in each setting. speeds up decoding with one request, but with batching on BF16 Qwen3.8-27B the same idea is 13% slower, because the extra check takes nearly a step. The drafter decides how to score a draft tree. DSpark conditions each drafted token on the one before it, and a tree that ignores this accepts half the tokens of one using it. The target and the GPU decide what each mechanism costs. A tree on hybrid Qwen3.8-27B [14] must track every node's recurrent state (§2.3), and the RTX PRO 6000 lacks Hopper's wgmma instructions, so kernels need porting. No universal optimization fits every deployment.
Manually optimizing each deployment does not scale, whereas coding agents [15, 16] iterate rapidly. This makes per-deployment optimization a natural fit for them, and agentic optimizers such as AlphaEvolve and ADRS already evolve programs against automated evaluators [17, 18]. For lossless speculative decoding, however, building a reliable evaluator is difficult for two reasons. First, many gains are only a few percent, close to timing noise, and a gain measured on development requests may not generalize to unseen ones. Second, an agent rewarded for speed is prone to reward hacking [19, 20], such as adopting a faster numerical shortcut that changes outputs without a measurable drop in task accuracy (Figure 2c).
We present SpecPilot (Figure 3), an autonomous agentic loop that searches for speculative decoding optimizations tailored to each deployment. It rests on four ideas. First, a cost model compares measured performance with an estimated ceiling to locate where speed is lost. Second, parallel agents explore multiple directions on separate GPUs and integrate the validated pieces, so small gains add up. Third, a controller isolated from the agents accepts a change only on a significant gain confirmed on unseen requests, and token forcing checks every output token against stock to detect lossy changes (§3.3). Finally, validated optimizations are distilled into a structured memory as replayable code and evidence, for reuse in later rounds and new deployments.
The loop developed lossless techniques, each targeting a gap the cost model measured (§4). Best-first tree verification exploits idle drafter candidates, even on hybrid recurrent targets, and W12, a general lossless 12-bit weight format, cuts the weight reads dominating single-request steps. Two-level verification pre-checks drafts at low precision, nearly doubling accepted tokens per exact pass. For batching, three mechanisms spend verify rows where they pay off (§4.4).
We evaluate SpecPilot on four target models, three drafters, two GPU platforms and five benchmarks. Without training or quality loss, it raises the speedup over AR from stock's 4.46× to 10.87× with one request (Figure 1), and from 1.94× to 3.93× with batching. On H100 with one request, it is 1.84× faster than DDTree [10].

(a) Single-Request Step Time

(b) Stock Speedup vs. Batch Size
(c) Accuracy Misses a Faulty System
Figure 2: (a) Single-request step time split into target weights and the rest, at peak bandwidth and as measured after the first optimization round. Reading the weights dominates the step. (b) Stock speedup over AR falls as the batch size grows, for Qwen3.8-27B in FP8 and Qwen3.5-4B in BF16. (c) Task accuracy change against stock, with 95% CIs, for a lossless system and a faulty one with an injected logit bias. All four intervals include zero, so accuracy cannot flag the faulty systems.
In summary, this paper makes the following contributions:
-
Autonomous Optimization Loop: We design SpecPilot, a ceiling-guided agentic framework that tailors speculative decoding to each deployment and transfers validated optimizations across hardware and models via a structured memory. To prevent reward hacking, we introduce token forcing, a stock-calibrated test that detects output divergences task accuracy misses.
-
Discovered Lossless Algorithms: SpecPilot discovered W12, a general lossless 12-bit weight format, best-first tree verification for hybrid recurrent targets, two-level verification and three mechanisms for batching.
-
Cross-Regime Bottleneck Analysis: We show how ceiling-guided discovery adapts to both memory-bandwidth and per-row compute bottlenecks, and why the same mechanism can accelerate one request but slow decoding with batching on the same GPU.
2 Background
2.1 Speculative Decoding
In speculative decoding [1, 2], a drafter proposes tokens after the prefix , and the target model verifies them in one forward pass, one per token. Greedy decoding accepts the longest prefix with and adds the target's argmax as a bonus, accepting tokens.
Lossless. A system is lossless if every accepted token lies on a path verified by a pass over the exact target weights (exact pass) and equals that pass's argmax. Its output is then the target's greedy decode up to floating-point reduction order, such as GEMM tiling or tree attention, which can change a token only at a logit near-tie. Stock already differs from AR in this way. At each first divergence, the two tokens' log-probabilities differ by at most 0.232 nats (§3.3). A low-precision verify pass, by contrast, can change tokens even far from near-ties. This makes losslessness hard to test. Requiring identical outputs rejects lossless systems, and task accuracy misses faulty ones (Figure 2c). Token forcing (§3.3) instead checks every token statistically against stock.

Figure 3: One round of the SpecPilot loop. 0 The cost model measures the gap between the current system and its ceiling. 1 Directions run in parallel, one per GPU. 2 Validated pieces stack into one system. 3 A kernel sub-agent tunes the kernels furthest from their byte floors. 4 Token forcing checks the sealed final against stock at every teacher-forced token. Each round distills its mechanisms into memory entries, which carry to later rounds and new deployments.
2.2 Parallel Drafters and Draft Trees
DFlash2 [5], like DFlash [4], drafts a block of masked positions in one pass from target hidden states. A low-rank selector scores each of the top-16 candidates per position given one at the previous position, and candidates and scores form the lattice. DSpark [6] adds a Markov head on the previous token:
where denotes the backbone's logits, and stock DSpark drafts a greedy chain with it.
A draft tree contains continuations that the target verifies in one pass, each node seeing only its ancestors, and the step accepts the longest root path matching the target's argmax plus a bonus token [7]. DDTree [10] adds nodes by path log-probability up to , so every prefix of this order is a best-first tree (prefix-closed).
2.3 Hybrid Targets
Our main target model, Qwen3.8-27B [14], uses Gated DeltaNet (GDN) [21] in 48 of 64 layers and attention elsewhere. A GDN head updates a fixed-size state per token by the gated delta rule,
with decay gate , write strength , and key, value and query . Stock verification snapshots at each verified position, so a tree needs one snapshot per node.
3 SpecPilot
SpecPilot operates in rounds (Figure 3). A round measures where the current system loses speed (Phase 0), lets agents build and time changes (Phases 1–3) and ends with a sealed final on unseen requests (Phase 4). Each round starts from the previous round's final system, and a new deployment from stock plus memory entries, so the loop is recursive.
3.1 Where Speculative Decoding Loses Speed
Phase 0 locates speed losses with a cost model that expresses the speedup over AR decoding as
where is the number of tokens a step accepts verifying rows (one per node with one request), the step time with drafting and one AR step on the same engine. Unless otherwise stated, single-request numbers in this paper use DFlash2 and Qwen3.8-27B on an H100 GPU.
Unused candidates (). Stock accepts far fewer tokens than its drafter's candidates allow. In exact replay, which reruns tree selection and verification offline on recorded drafter lattices and target outputs, stock DFlash2's 8-position chain accepts tokens per step (4.65 live on the bench requests of §5.1). An oracle that keeps accepting the target's greedy token while it stays in the drafter's top-16 would accept 6.42 at 8 positions and 8.20 at 16 (§6.4).
Weight streaming (, single request). With one request, reading the target's weights dominates the step, so extra verify rows are nearly free. Before the first round, GEMM time grew only from 17.88 ms for one row to 18.58 ms for 64. After the first round, reading target weights (linears and LM head) took 80% of the measured 23.61 ms step. Even at the H100's peak 3.35 TB/s, reading them would take 92% of the time needed to read all bytes of the step (Figure 2a).
Per-row cost (, batching). Each batched request adds recurrent-state and attention cost, and GEMM time steps up at each tile boundary. Each new prompt's prefill streams the weights again. Stock DFlash2's speedup over AR in FP8 falls from with one request to with 24, and on Qwen3.5-4B from to with 32 (Figure 2b).
Ceilings. To rank these effects, the cost model computes a ceiling for the system a round starts from. The ceiling is the speedup over that system a step could reach if it drafted once, verified the best tree in one exact pass and ran every kernel class (target GEMMs, recurrent layers, attention, drafter, prefill and the rest) at its byte floor, defined as the larger of its FLOP time at 60% of peak dense throughput and its byte time at 90% of peak bandwidth. The ceiling factors as
where and are measured on the starting system, and is the of the best-first tree in exact replay at the best node budget. The factor measures how many more tokens a better tree would accept. The kernel factor compares the profiled step time with the sum of its byte floors , measuring slow kernels. The overhead factor compares with , measuring time outside the profile.
Ceilings in use. Phase 0 of each round recomputes the factors from recorded lattices and profiles, and the largest factor identifies the gap. §6.1 traces them over three rounds.
3.2 Agents and Phases
SpecPilot separates the agents that modify the system from the controller that measures it (Figure 3). A master agent plans directions, one idea per GPU, each with an estimated headroom (expected gain). A sub-agent implements each direction as patches, code changes behind options whose defaults reproduce stock. A patch must pass correctness checks and token forcing (§3.3) on

Figure 4: Token forcing on lossless and faulty systems in sealed finals. Bars give the mismatch rate with 95% CIs, and dashed lines the rate-rule limit. Above the bars are the verdict and the count of large-margin events. Faulty systems add a logit bias of 2 to every 7th vocabulary id after 2048 tokens.
development requests, which agents see. The controller, scripts that agents call but cannot modify, times it against the current best in paired runs, where both systems serve the same requests on two GPUs, swapping GPUs between runs. It promotes the patch only if its gain's 95% lower bound exceeds 1% plus twice the stock-versus-stock noise (< 0.1% for one request on H100), or ~3% if its outputs diverge from the current best's.
Phase 1: Exploration. The master starts from Phase 0's cost model and proposes directions aimed at its largest factors. A single direction can stall on an idea that does not pay off, so the master explores the most promising few at once. A sub-agent first checks the headroom with the cheapest evidence, such as exact replay, a microbenchmark or a timing run on one GPU. It builds a new algorithm only if the headroom, net of runtime overhead, is at least 3%. It closes a direction only after measuring the implemented mechanism, unless that would take over 10 GPU-minutes.
Phases 2–3: Integration and kernel tuning. Many patches gain too little to promote alone, but enough together. An integration sub-agent stacks them on the current best and times the stack under the same rule. A kernel sub-agent profiles it and tunes kernels furthest from byte floors.
Phase 4: Sealed final. Each round ends with a sealed final, which times the system against stock on unseen requests and reruns token forcing on its outputs and on longer outputs of up to 4096 tokens. A final that fails either check is rejected.
A worked example. In round two, step cost led (§6.1), so the master opened a direction cutting weight bytes (W12, Figure 5). Byte arithmetic put its headroom at 25% of the 15.30 ms weight read, and a microbenchmark closed a denser 11-bit variant that decoded 3× slower. The first patch was promoted at 1.076× in paired runs and a revised kernel gave 1.063×. The DSpark, RTX PRO 6000 and Muse-Glimmer deployments reused W12 from memory (§5.3).
3.3 Token Forcing
Losslessness holds by construction (§4). Token forcing tests the implementation against stock for bugs and reward hacking. A teacher-forced scorer feeds the system's outputs back through the target on the stock engine with an FP32 LM head. A token is a mismatch if it differs from the scorer's argmax, and its margin is the log-probability gap to that argmax. Stock mismatches on 0.72% of tokens, almost all near-ties from kernel rounding. Phase 0 sets the near-tie threshold δ by rounding up the largest margin at stock's first departures from AR to a multiple of 1/8.
(a) Encoding: bit-exact, once at load

(b) GEMM: persistent stream-K kernel, one CTA per SM

Figure 5: W12. (a) Each BF16 weight becomes three 4-bit planes: A holds the sign and the top three mantissa bits, E a 4-bit exponent offset within a 16-binade window per output channel, and B the low mantissa bits. A and E form the 8-bit view that the Q pass of two-level verification reads. The remaining weights, a fraction of on Qwen3.8-27B, go to an exact escape list. (b) The GEMM decodes W12 records in registers and feeds them to wgmma as the register operand.
A system is rejected under either of two rules. The rate rule rejects it if its mismatch rate exceeds stock's by more than 0.5 points at 95% confidence. The event rule rejects it if a binomial test finds its unexplained large-margin events, mismatches with margin above , more frequent than stock's. An audit explains an event if stock reproduces it on its own paths or margins, or if the scorer's argmax changes with the prefill length. Figure 4 tests lossless and faulty systems.
3.4 Structured Memory
Memory lets a new deployment's first round start from stock plus validated entries chosen by the master. After a sealed final, each promoted mechanism becomes one memory entry, holding a code delta against the entries it requires, a registry record of its variants, correctness contract and options, and a summary of its evidence, limits and untested regimes. An entry is kept only if applying it with its requirements to stock reproduces its source system's code exactly. A reused entry is re-tuned and re-timed in the new deployment and never counts as a new discovery. The memory now holds 140 entries with up to twelve requirements each and covers every setting in §5.1 (15 entries specific to sm_120).
4 Discovered Lossless Algorithms
We describe each mechanism and why it is lossless.
4.1 W12: A Lossless 12-bit Weight Format
W12 reduces the step cost relative to AR decoding by reading fewer bytes per weight while keeping every bit exact. Most BF16 weights in an output channel span only a few binades (powers of two). For each channel , W12 selects the 16-binade window that covers the most weights. Each weight with in-window exponent is stored as its sign bit, a 4-bit exponent offset , and its seven mantissa bits, for a total of 12 bits (Figure 5a). Weights outside the window, zeros and denormals become escapes, which a sparse per-channel list restores exactly. W12 averages only 12.01–12.02 bits per weight on eight dense models and shrinks Qwen3.8-27B's

Figure 6: Best-first tree on a hybrid target. On the same lattice, stock verifies only the greedy chain, which stops at its first miss. The best-first tree keeps the nodes with the highest path score , so another candidate can continue. On hybrid targets, each root path recomputes its GDN state. The right panel compares the path and WY verify kernels over 48 GDN layers on H100.
converted layers from 44.67 to 33.58 GB. At load time, the server checks every decoded tensor against the checkpoint bit for bit.
The GEMM kernel decodes W12 in registers, so the memory stream hides decoding. Each 12 KB record covers a weight tile. It holds the 8-bit view, one byte per weight with the sign, top three mantissa bits and exponent offset (planes A and E), then the low mantissa bits (plane B). A stream-K kernel (Figure 5b) splits the reduction loop over thread blocks in a fixed order, so the GEMM is deterministic.
Certified LM head. On H100, W12 leaves the LM head in BF16. An INT8 copy with a per-row Cauchy–Schwarz error bound discards every token that provably cannot be the argmax, and the survivors are rescored exactly. When too many survive, the full head runs instead. The argmax thus never changes. This reduces LM head latency from 878 to 482 s, outperforming W12. On the RTX PRO 6000, the certified head is slower than BF16 (2598 vs. 1750 s), so W12 converts the LM head there.
4.2 Tree Verification for Hybrid Targets
Round one built best-first trees (Figure 6) on the DFlash2 lattice, scoring each edge by log softmax of selector scores given its parent, not by DDTree's marginal scores [10]. The drafter runs 16 positions, twice its trained block size, and the tree verifies nodes up to depth 15, more than the drafted positions (a wide tree).
Recurrent state without snapshots. SpecPilot recomputes the recurrent state along each root path instead of storing it per node. A path verify kernel walks each path from the committed state, and a commit kernel replays the accepted path into all 48 GDN layers, matching the stock kernel bit for bit on chains. The faster WY verify kernel, following TreeWY [22], turns the chain of rank-one updates in Eq. (2) into matrix products, solving all paths at once on tensor cores. It splits the FP32 state into three BF16 parts that represent all 24 significand bits exactly, accumulates tensor-core products in FP32, and stays within one BF16 ulp of the path kernel's outputs. Both kernels change only rounding, so the exact pass stays exact.
DSpark lattice. DSpark's Markov head scores adjacent-token pairs like the DFlash2 selector, so the best-first builder runs unchanged on a DSpark lattice that scores each child by Eq. (1) with its parent taken as .

Figure 7: Two-level verification. A low-precision Q pass checks the draft tree and returns chain C, the path that matches the Q pass's argmax plus a bonus token, without updating the target's state. The drafter drafts again from the end of C, and one exact pass over the W12 weights verifies C and the new subtree. Times are from one final H100 cycle, and tokens per exact pass from TLV's round. The right panel shows the 8-bit view nested in each W12 record, which the Q pass reads.
4.3 Two-Level Verification
Each TLV cycle has two passes (Figure 7). A Q pass over the 8-bit view of W12 checks the draft tree and returns the path that matches its argmax and a bonus token as a chain C, without updating the KV cache or the recurrent state. The drafter drafts again from the end of C, and its best-first subtree, truncated to nodes, is attached below C. One exact pass over the W12 weights verifies the combined 32-node tree and accepts the longest matching path. TLV is lossless because only the exact pass accepts tokens. Under TLV, denotes tokens per exact pass and is the time of the two-pass cycle, including both drafting steps.
Zero-copy Q pass. TLV does not maintain a separate low-precision target model, since it reads the 8-bit view already nested in W12. This view is the first two thirds of each W12 record. With the dropped mantissa bits set to their midpoint, the Q pass matches the exact pass's top-1 token at 98.7% of positions, whereas the exact pass reads the full records.
4.4 Batched Serving
Every batched row costs time (§3.1). These mechanisms only pick the rows to draft and verify, so they are lossless.
Shared node budget. Each step verifies a fixed node budget shared across requests, taking the top nodes by path log-probability. As best-first trees are prefix-closed (§2.2), each request's share is a valid tree. On the FP8 target (Qwen3.8-27B in FP8) at 24 requests, the 192-node budget is on a plateau of the target GEMM's cost, flat until the next tile.
Per-request drafter block. Each request drafts 16, 12 or 8 positions, chosen on the GPU from its recent acceptance and draft confidence, and its tree depth is capped to match. This keeps the FP8 target's drafter within 256 rows, the end of the drafter GEMM's plateau, with 17 to 24 requests.
Prompt admission. A new prompt's rows enter the verify step, so one weight stream serves both. On the FP8 target, a prompt of up to 384 tokens enters as a chain of prompt rows, but only when the scheduler would otherwise hold it back. Both FP8 final systems admit prompts this way. For batched BF16 Qwen3.8-27B, prompts enter in 128-row segments that share the verify step's projection and MLP GEMMs.
Table 1: Speedup over AR and , the tokens accepted per exact target pass, with one request on BF16 targets. SpecPilot uses two-level verification, so each exact pass verifies two chained drafts and accepts far more tokens than stock.
| Model | Method | MATH | CODE | CHAT | Avg. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GSM8K | MATH500 | HumanEval | MBPP | MT-Bench | |||||||||||
| H100 SXM5 | Speedup | Speedup | Speedup | Speedup | Speedup | Speedup | |||||||||
| Qwen3.8-27B | DFlash2 | 4.47× | 5.82 | 4.31× | 5.26 | 3.86× | 4.69 | 3.83× | 4.71 | 3.36× | 3.84 | 3.95× | 4.65 | ||
| +SpecPilot | 10.33× | 16.69 | 10.00× | 15.46 | 8.49× | 13.05 | 8.24× | 12.66 | 7.55× | 10.81 | 8.86× | 13.08 | |||
| DSpark | 4.43× | 5.87 | 4.15× | 5.11 | 3.57× | 4.39 | 3.50× | 4.45 | 3.17× | 3.61 | 3.74× | 4.42 | |||
| +SpecPilot | 11.01× | 16.67 | 10.69× | 15.66 | 8.86× | 12.72 | 9.02× | 12.79 | 7.85× | 10.17 | 9.41× | 12.85 | |||
| RTX PRO 6000 | Speedup | Speedup | Speedup | Speedup | Speedup | Speedup | |||||||||
| Qwen3.8-27B | DFlash2 | 5.23× | 6.82 | 4.81× | 6.07 | 4.47× | 5.62 | 4.24× | 5.25 | 3.72× | 4.06 | 4.46× | 5.23 | ||
| +SpecPilot | 12.83× | 16.75 | 11.99× | 15.02 | 10.47× | 13.24 | 10.55× | 12.98 | 8.93× | 10.25 | 10.87× | 12.80 | |||
| Muse-Glimmer-30B | DFlash2 | 5.08× | 5.31 | 5.64× | 6.70 | 4.91× | 5.77 | 4.59× | 5.51 | 3.50× | 3.76 | 4.69× | 5.16 | ||
| +SpecPilot | 11.47× | 13.24 | 12.85× | 16.02 | 10.75× | 13.69 | 10.25× | 13.08 | 8.34× | 9.80 | 10.63× | 12.64 | |||
5 Evaluation
We examine whether the speedups hold across drafters, targets, serving regimes and GPU platforms (§5.2) and whether memory carries them to new deployments (§5.3).
5.1 Setup
Hardware and agents. Each SGLang [23] server uses one H100 SXM5 or RTX PRO 6000 Blackwell Server Edition (sm_120, 1.51 TB/s measured), on a frozen v0.5.20 build, token-identical to the release. Agents are Claude Opus 5.5 in Claude Code [15].
Models and requests. With one request, all targets run in BF16: Qwen3.8-27B [14] with DFlash2 on both GPUs and with DSpark on H100, and Muse-Glimmer-30B [24] with DFlash2 on the RTX PRO 6000. With batching on H100, Qwen3.8-27B runs with DFlash2 or DSpark in FP8, and with DFlash2 in BF16 at 6, 8 and 10 requests as GPU memory allows. Qwen3.5-4B [25] uses DFlash2 and Gemma-4-12B [26] uses EAGLE-3, both in BF16. Requests are from GSM8K [27], HumanEval [28], MATH500 [29, 30], MBPP [31] and MT-Bench [32]. Decoding is greedy with thinking enabled, and batched clients run closed-loop with a fixed number of requests in flight (the batch size).
Metrics. A gain is the geometric mean of per-request output-rate ratios per benchmark and batch size, combined by an equal-weight geometric mean. Every gain over stock comes from a sealed final (§3.2) with two paired runs. Every final system passed token forcing. Speedups over AR (Tables 1 and 2) come from interleaved runs of AR, stock and SpecPilot on development requests, within −2% to +6% of the sealed gains on unseen requests.
Baselines. To keep the comparison fair, stock is tuned for each GPU and regime, using the pretrained drafter and the fastest upstream SGLang options we found. On H100, stock DFlash2 drafts its trained block size, as in the released configuration. On the RTX PRO 6000, the best stock for Qwen3.8-27B uses block 12 with Triton attention and is 9.9% faster than the H100 configuration. No EAGLE-3 configuration beats the default by more than 2.4%. For single requests on H100, stock DFlash2 with DDTree trees is a stronger baseline, at 4.82× over AR on the bench.
Table 2: Speedup over AR and with batching on H100, averaged over 16/20/24 requests on Qwen3.8-27B in FP8, and over 24/28/32 on Qwen3.5-4B and 16/32/48 on Gemma-4-12B, both in BF16.
| Model | Method | MATH | CODE | CHAT | Avg. | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GSM8K | MATH500 | HumanEval | MBPP | MT-Bench | |||||||||
| H100 SXM5 | Speedup | Speedup | Speedup | Speedup | Speedup | Speedup | |||||||
| Qwen3.8-27B | DFlash2 | 2.11× | 5.02 | 2.19× | 5.03 | 2.05× | 4.56 | 2.12× | 5.03 | 1.69× | 3.80 | 2.02× | 4.56 |
| +SpecPilot | 4.39× | 6.14 | 4.33× | 5.95 | 3.81× | 5.38 | 4.07× | 6.20 | 3.07× | 4.33 | 3.90× | 5.39 | |
| DSpark | 2.12× | 5.00 | 2.16× | 4.87 | 1.95× | 4.38 | 1.96× | 4.81 | 1.56× | 3.58 | 1.94× | 4.37 | |
| +SpecPilot | 4.60× | 6.28 | 4.39× | 6.11 | 3.82× | 5.45 | 3.97× | 6.07 | 3.05× | 4.32 | 3.93× | 5.42 | |
| Qwen3.5-4B | DFlash2 | 1.62× | 6.82 | 1.88× | 8.17 | 1.60× | 7.15 | 1.27× | 5.88 | 1.25× | 5.16 | 1.51× | 6.58 |
| +SpecPilot | 4.04× | 7.30 | 4.61× | 8.60 | 4.00× | 7.42 | 3.30× | 6.31 | 3.11× | 5.49 | 3.77× | 6.97 | |
| Gemma-4-12B | EAGLE-3 | 0.69× | 2.00 | 0.79× | 2.36 | 0.66× | 1.97 | 0.69× | 2.08 | 0.61× | 1.78 | 0.68× | 2.04 |
| +SpecPilot | 2.28× | 2.82 | 2.41× | 2.94 | 2.22× | 2.64 | 1.88× | 2.28 | 1.74× | 2.02 | 2.09× | 2.54 | |
5.2 Main Results
With one request, SpecPilot is more than twice as fast as stock in every setting (Table 3), most on Qwen3.8-27B on the RTX PRO 6000. Over AR, it reaches 8.86–9.41× on H100 and 10.63–10.87× on the RTX PRO 6000 (Table 1). On H100, it is also 1.84× faster than the DDTree baseline.
With batching on FP8 Qwen3.8-27B, SpecPilot beats stock at every batch size, by 1.85× with DFlash2 and 1.94× with DSpark overall, raising the speedup over AR from about 2× to 3.90× and 3.93× (Table 2). In BF16, it is 1.71× faster, at 5.67× over AR against 3.20× for stock. Targets with weaker stock gain more, 2.39× on Qwen3.5-4B and 3.11× on Gemma-4-12B, where stock trails AR.
5.3 Generality Through Memory
Memory generalizes across drafters, target models and GPU platforms, even to EAGLE-3, a sequential drafter. In each new deployment, the agents reused validated mechanisms and adapted them to the new drafter, model or GPU.
New drafters. DSpark reused the tree, W12 and TLV entries, which one promotion applied together with the new DSpark lattice (2.110×). DSpark also added the INT6 copy for the Q pass. EAGLE-3 on Gemma-4-12B reimplemented two designs from memory, W12 on the MLP and prompt admission. Its own entries attach an n-gram chain to the EAGLE tree, select nodes by acceptance probabilities calibrated on recorded trees and add single-KV-head attention kernels. Its first round reached a sealed 2.67×, and promotions like calibrated selection and prompt admission raised the final speedup to 3.11×.
A new GPU platform. The RTX PRO 6000 has 99 KB of shared memory per thread block and no wgamma. Porting the H100 tree and W12 entries, with W12 on mma. sync and tree verification on the Triton attention backend, alone gave a sealed 1.92× over stock, most of the final gain. TLV with split-KV verify attention, which splits each request's KV sequence across thread blocks, and an INT6/INT8 Q-pass copy raised it to 2.44×. This exceeds its 2.12× ceiling over stock, which assumes one draft per pass (§3.1).
A new model family. Muse-Glimmer-30B, a dense model without recurrent layers, reused memory except the GDN entries. Its first promotion applied the tree, W12, TLV and the INT6/INT8

Figure 8: Single-request Qwen3.8-27B with DFlash2 on H100 over three rounds. Filled points mark steps of the algorithms in §4.1–4.3.
copy, with exact sliding-window attention in the 32-node tree. Kernel fusion with L2 prefetching then raised the final speedup to 2.21× on the RTX PRO 6000.
6 Analysis
6.1 How the System Evolved over Three Rounds
The system went from stock's 184 to 416 tokens/s in three rounds (Figure 8), and each round faced a different bottleneck. The cost model re-measured the ceiling each round, so the master redirected its parallel search to the factor holding the most speed instead of refining the previous gain.
Round one: tokens. Stock verified one chain though extra rows were nearly free, and the factor led the ceiling. The round built best-first trees (§4.2) and reached 270 tokens/s. Exact replay showed a better tree on this lattice would add little, which moved the bottleneck from tokens to the step.
Round two: weight bytes. Reading target weights took 80% of the step, so the bytes per weight became the largest lever. The master opened a direction on a lossless 12-bit format (§4.1) and kept it through three promotions across two rounds. Its value came from the kernel as much as the format, since the W12 GEMM decodes weights in registers and beats cuBLAS at the few rows of a verify pass (§6.3).
Round three: the unit of a step. The W12 single-pass step, with one exact pass, ran about 25% above its byte floors, and trees were near their best on the lattice, so neither factor had much headroom. The remaining gain lay in an assumption of the ceiling, one exact pass per draft. TLV removed it by drafting twice per exact pass (§4.3), which nearly doubled tokens per exact pass and took the system to 416 tokens/s.
Single-agent baseline. We compare SpecPilot with a single-agent loop that lacks the cost model, in the same setting. After three rounds, this baseline reached only 1.34× over stock, compared with 2.13× for SpecPilot. Without ceilings to rank the gaps, it focused on the most visible one, tokens per step, adding a 24-node best-first tree, a longer drafter block and cheaper drafter weights. It never addressed the target weight reads, although they took 80% of the step. In contrast, SpecPilot recomputed the ceiling every round and followed the largest factor as it shifted, from trees to weight bytes (W12) and then to the unit of a step (TLV).

(a) AR Decoding Speedup

(b) Weight Memory

(c) W12 GEMM vs. cuBLAS
Figure 9: W12 beyond speculative decoding, on H100. (a) AR decoding speedup over BF16 weights in SGLang with one request. (b) Weight memory in BF16 and W12. (c) W12 GEMM speedup over cuBLAS on Qwen3.8-27B projections at 1 and 32 rows, with cold L2.
6.2 Testing Token Forcing with Injected Faults
Token forcing separates faulty from lossless systems, but task accuracy does not. Lossless Qwen3.8-27B and 4B systems and two faulty ones, which add a logit bias of 2 to every 7th vocabulary id after 2048 tokens, ran sealed finals. Development outputs stop at 2048 tokens, so only the sealed finals' outputs of up to 4096 tokens reach the fault. On Qwen3.8-27B, accuracy changed by -0.3 points [-1.6, +0.7] for the lossless system and -1.6 [-3.6, +0.3] for the faulty one, so the intervals overlap. Token forcing accepts both lossless systems, whose mismatch rates (0.73% and 0.52%) match stock's (0.72% and 0.53%), and rejects both faulty ones, at 2.0% and 2.4%, with 192 and 191 of their 200 audited large-margin events left unexplained.
6.3 W12 as a General Lossless Weight Format
W12 is a lossless weight format useful beyond speculative decoding. Every dense model we encoded, from six families, compresses to about 12 bits per weight (§4.1), a quarter fewer bytes in every converted layer, without changing any output. Its GEMM speeds up any matrix product bound by weight bytes, which includes the single row of AR decoding as well as the few rows of a verify pass.
In AR decoding on SGLang, without speculation, W12 alone gives a 1.19–1.28× speedup on Muse-Glimmer-30B, Qwen3.8-27B, Gemma-4-12B and Llama-3.1-8B with one request (Figure 9a), and 1.13–1.20× with 32 requests. It shrinks the weights by 14–22% (Figure 9b), which grows the KV pool 2.0× on Qwen3.8-27B and 2.5× on Muse-Glimmer-30B, leaving room for more requests.
The shipped W12 GEMM beats cuBLAS on every Qwen3.8-27B projection, by 1.19–1.47× at one row, as in AR decoding, and by 1.17–1.35× at 32 rows, as in a verify pass (Figure 9c). The first W12 kernel took 0.80–0.89 of cuBLAS's time at 32 rows. On the RTX PRO 6000, W12 is 1.18–1.68× faster on all 13 shapes at up to 32 rows. A 128-byte swizzled activation layout allows 48-row tiles, so W12 GEMMs stay near their byte floor and flat across verify rows.
6.4 Tree Gains in Exact Replay
Exact replay reruns tree selection and verification on recorded lattices, so it isolates the tree from timing noise (Figure 10). On the 8-position lattice, best-first trees raise from 4.25 (stock chain) to 5.38 at 32 nodes. Drafting 16 positions lifts the curve to 5.85 at 32 nodes and 6.25 at 63. At 16
Table 3: Sealed gains over stock on unseen requests, and tokens per step from Tables 1 and 2.
| Target | Drafter | Gain | Tokens/step |
|---|---|---|---|
| Single request, H100 SXM5 | |||
| Qwen3.8-27B | DFlash2 | ||
| Qwen3.8-27B | DSpark | ||
| Single request, RTX PRO 6000 | |||
| Qwen3.8-27B | DFlash2 | ||
| Muse-Glimmer-30B | DFlash2 | ||
| Batching, H100 SXM5 | |||
| Qwen3.8-27B (FP8) | DFlash2 | ||
| Qwen3.8-27B (FP8) | DSpark | ||
| Qwen3.5-4B | DFlash2 | ||
| Gemma-4-12B | EAGLE-3 | ||
nodes, best-first trees match an EAGLE-2-style top-4 tree (5.03 vs. 5.02) and beat a Sequoia tree (4.71), so further gains must come from the lattice and node budget.
6.5 Why Mechanisms Depend on the Regime
Mechanisms that spend more verify work per exact pass help with one request, where the weight stream hides that work, and hurt with batching, where it adds up. Wide trees, W12 and TLV gained with one request on all three Qwen3.8-27B deployments. With batching, 24-node trees lost 14.9% on the FP8 target, and on BF16 Qwen3.8-27B a 24-position block lost 9.9% and TLV 13%. TLV's Q pass cuts bytes only in the attention and recurrent-layer projections. With the Q pass at 0.80–0.88 of a step, a cycle must accept nearly twice the tokens of a single-pass step to break even.
Mechanisms that choose rows selectively gain with batching. With DSpark, the shared node budget accepted 6–14% more tokens than equal-size per-request trees, and per-request drafter blocks gave . Prompt rows are cheap only if compute idles in the weight stream, so admitting only waiting prompts gained 3.5% (unpaired) at 24 requests, while admitting every short prompt lost.
7 Related Work
Agents for systems. LLM program search improves code with automated evaluators, as in FunSearch [33], AlphaEvolve [17] and ADRS [18], after AlphaDev [34] and search-based compilers such as Ansor [35]. KernelBench [36] scores generated GPU kernels, and CUDA-L1 [37] optimizes them with reinforcement learning.
Drafters and trees. Medusa [38], EAGLE [3, 9, 39], Lookahead [40] and self-speculative methods [41, 42] change drafting. Sequoia [8], EAGLE-2 [9], OPT-Tree [43], DDTree [10] and CaDDTree [44] shape trees for acceptance or throughput, and the concurrent PCTree [45] builds trees from DSpark's Markov head. Our best-first trees score each edge given its parent, unlike DDTree, and verify more nodes than drafted positions. With batching, requests share one node budget. STree [46] and TreeWY [22] verify hybrid-target trees without per-node state, and we add a commit that replays the accepted path.
Hierarchical speculation. Staged speculative decoding [47], TriForce [48] and ML-SpecQD [49] place an intermediate model between the drafter and the target, and QSpec [50] and

Figure 10: Tokens per step in exact replay of single-request DFlash2 on Qwen3.8-27B, against the number of verified nodes . Best-first trees run on lattices drafted with 8 and 16 positions. The gray line is stock's 8-position chain, and the oracle on the 16-position lattice reaches 8.2 tokens per step.
QuantSpec [51] draft with a low-precision version of the target. In these methods, the intermediate model serves as a drafter. TLV instead uses a low-precision target as an intermediate verifier. It checks the drafter's full tree without accepting tokens, and one exact pass verifies its matching path plus a second draft (§4.3).
Speculation with batching. TurboSpec [11] adapts to goodput, MagicDec [12] handles large batches, and D-cut [13] prunes drafts across requests, while our node budget at a GEMM plateau takes the most probable nodes of all requests.
Lossless weight compression. ZipNN [52] and DFloat11 [53] entropy-code weights to save memory but decode them before the GEMM, and DFloat11 runs slower than cuBLAS on H100. ZipServ [54] and Unweight [55] fuse decoding into the GEMM but do not consistently beat cuBLAS on HBM GPUs. W12 gives every weight a fixed 12-bit record that the GEMM decodes in registers. To our knowledge, it is the first lossless format whose GEMM beats cuBLAS on H100, by from 1 to 32 rows.
8 Conclusion
This work introduces SpecPilot, an autonomous agentic loop for algorithm discovery and systems optimization in lossless speculative decoding. Through ceiling-guided discovery, SpecPilot adapts to the distinct bottlenecks of complex serving regimes. We evaluate SpecPilot across four target models, three drafters, two GPU platforms and five benchmarks. Without training or quality loss, it raises the speedup over AR from stock's to with one request, and from to with batching.
References
[1] Yaniv Leviathan, Matan Kalman, and Yossi Matias. Fast inference from transformers via speculative decoding. In ICML, 2023.
[2] Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper. Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318, 2023.
[3] Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. EAGLE-3: Scaling up inference acceleration of large language models via training-time test. In NeurIPS, 2025.
[4] Jian Chen, Yesheng Liang, and Zhijian Liu. DFlash: Block diffusion for flash speculative decoding. In ICML, 2026.
[5] Inco AI. DFlash 2: Keep drafting parallel, 2026.
[6] Xin Cheng, Xingkai Yu, Chenze Shao, Jiashi Li, Yunfan Xiong, Yi Qian, Jiaqi Zhu, Shirong Ma, Xiaokang Zhang, Jiasheng Ye, Qinyu Chen, Chengqi Deng, Jiping Yu, Damai Dai, Zhengyan Zhang, Yixuan Wei, Yixuan Tan, Wenkai Yang, Runxin Xu, Yu Wu, Zhean Xu, Xuanyu Wang, Muyang Chen, Rui Tian, Xiao Bi, Zhewen Hao, Shaoyuan Chen, Huanqi Cao, Wentao Zhang, Anyi Xu, Huishuai Zhang, Dongyan Zhao, and Wenfeng Liang. DSpark: Confidence-scheduled speculative decoding with semi-autoregressive generation. arXiv preprint arXiv:2607.05147, 2026.
[7] Xupeng Miao, Gabriele Oliaro, Zhihao Zhang, Xinhao Cheng, Zeyu Wang, Zhengxin Zhang, Rae Ying Yee Wong, Alan Zhu, Lijie Yang, Xiaoxiang Shi, Chunan Shi, Zhuoming Chen, Daiyaan Arfeen, Reyna Abhyankar, and Zhihao Jia. SpecInfer: Accelerating large language model serving with tree-based speculative inference and verification. In ASPLOS, 2024.
[8] Zhuoming Chen, Avner May, Ruslan Svirschevski, Yuhsun Huang, Max Ryabinin, Zhihao Jia, and Beidi Chen. Sequoia: Scalable and robust speculative decoding. In NeurIPS, 2024.
[9] Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. EAGLE-2: Faster inference of language models with dynamic draft trees. In EMNLP, 2024.
[10] Liran Ringel and Yaniv Romano. Accelerating speculative decoding with block diffusion draft trees. arXiv preprint arXiv:2604.12989, 2026.
[11] Xiaoxuan Liu, Jongseok Park, Langxiang Hu, Woosuk Kwon, Zhuohan Li, Chen Zhang, Kuntai Du, Xiangxi Mo, Kaichao You, Alvin Cheung, Zhijie Deng, Ion Stoica, and Hao Zhang. TurboSpec: Closed-loop speculation control system for optimizing LLM serving goodput. arXiv preprint arXiv:2406.14066, 2024.
[12] Ranajoy Sadhukhan, Jian Chen, Zhuoming Chen, Vashisth Tiwari, Ruihang Lai, Jinyuan Shi, Ian En-Hsu Yen, Avner May, Tianqi Chen, and Beidi Chen. MagicDec: Breaking the latency-throughput tradeoff for long context generation with speculative decoding. In ICLR, 2025.
[13] Tianyu Liu, Yuhao Shen, Rui Cen, Junhan Shi, Jiebin Zhang, Guangshuo Qin, Hong Liu, Song Liu, Guanghua Yu, and Jianchen Zhu. D-cut: Adaptive verification depth pruning for batched speculative decoding. arXiv preprint arXiv:2607.14647, 2026.
[14] Qwen Team. Qwen3.8-27B, 2026.
[15] Anthropic. Claude Code, 2025.
[16] OpenAI. Codex, 2025.
[17] Alexander Novikov, Ngân Vũ, Marvin Eisenberger, Emilien Dupont, Po-Sen Huang, Adam Zsolt Wagner, Sergey Shirobokov, Borislav Kozlovskii, Francisco J. R. Ruiz, Abbas Mehrabian, M. Pawan Kumar, Abigail See, Swarat Chaudhuri, George Holland, Alex Davies, Sebastian Nowozin, Pushmeet Kohli, and Matej Balog. AlphaEvolve: A coding agent for scientific and algorithmic discovery. arXiv preprint arXiv:2506.13131, 2025.
[18] Audrey Cheng, Shu Liu, Melissa Pan, Zhifei Li, Bowen Wang, Alex Krentsel, Tian Xia, Mert Cemri, Jongseok Park, Shuo Yang, Jeff Chen, Lakshya Agrawal, Aditya Desai, Jiarong Xing, Koushik Sen, Matei Zaharia, and Ion Stoica. Barbarians at the gate: How AI is upending systems research. arXiv preprint arXiv:2510.06189, 2025.
[19] Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in AI safety. arXiv preprint arXiv:1606.06565, 2016.
[20] Joar Skalse, Nikolaus H. R. Howe, Dmitrii Krasheninnikov, and David Krueger. Defining and characterizing reward hacking. In NeurIPS, 2022.
[21] Songlin Yang, Jan Kautz, and Ali Hatamizadeh. Gated delta networks: Improving Mamba2 with delta rule. In ICLR, 2025.
[22] Sneha Murthy Ghantasala. TreeWY: Speculative verification for gated DeltaNet hybrids. arXiv preprint arXiv:2608.20961, 2026.
[23] Lianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun, Jeff Huang, Cody Hao Yu, Shiyi Cao, Christos Kozyrakis, Ion Stoica, Joseph E. Gonzalez, Clark Barrett, and Ying Sheng. SGLang: Efficient execution of structured language model programs. In NeurIPS, 2024.
[24] Meta. Muse Glimmer: An open model built for always-on local agents, 2026.
[25] Qwen Team. Qwen3.5-4B, 2026.
[26] Gemma Team, Sherif El Abd, Vaibhav Aggarwal, Robin Algayres, Alek Andreev, Olivier Bachem, Ian Ballantyne, Cormac Brick, Victor Cărbune, Michelle Casbon, et al. Gemma 4 technical report. arXiv preprint arXiv:2607.02770, 2026.
[27] Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
[28] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
[29] Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the MATH dataset. In NeurIPS Datasets and Benchmarks, 2021.
[30] Hunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let's verify step by step. In ICLR, 2024.
[31] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, and Charles Sutton. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
[32] Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. Judging LLM-as-a-judge with MT-Bench and Chatbot Arena. In NeurIPS Datasets and Benchmarks, 2023.
[33] Bernardino Romera-Paredes, Mohammadamin Barekatain, Alexander Novikov, Matej Balog, M. Pawan Kumar, Emilien Dupont, Francisco J. R. Ruiz, Jordan S. Ellenberg, Pengming Wang, Omar Fawzi, Pushmeet Kohli, and Alhussein Fawzi. Mathematical discoveries from program search with large language models. Nature, 2024.
[34] Daniel J. Mankowitz, Andrea Michi, Anton Zhernov, Marco Gelmi, Marco Selvi, Cosmin Paduraru, Edouard Leurent, Shariq Iqbal, Jean-Baptiste Lespiau, Alex Ahern, Thomas Köppe, Kevin Millikin, Stephen Gaffney, Sophie Elster, Jackson Broshear, Chris Gamble, Kieran Milan, Robert Tung, Minjae Hwang, Taylan Cemgil, Mohammadamin Barekatain, Yujia Li, Amol Mandhane, Thomas Hubert, Julian Schrittwieser, Demis Hassabis, Pushmeet Kohli, Martin Riedmiller, Oriol Vinyals, and David Silver. Faster sorting algorithms discovered using deep reinforcement learning. Nature, 2023.
[35] Lianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu, Cody Hao Yu, Ameer Haj-Ali, Yida Wang, Jun Yang, Danyang Zhuo, Koushik Sen, Joseph E. Gonzalez, and Ion Stoica. Ansor: Generating high-performance tensor programs for deep learning. In OSDI, 2020.
[36] Anne Ouyang, Simon Guo, Simran Arora, Alex L. Zhang, William Hu, Christopher Ré, and Azalia Mirhoseini. KernelBench: Can LLMs write efficient GPU kernels? In ICML, 2025.
[37] Xiaoya Li, Albert Wang, Guoyin Wang, Jiwei Li, and Chris Shum. CUDA-L1: Improving CUDA optimization via contrastive reinforcement learning. In ICLR, 2026.
[38] Tianle Cai, Yuhong Li, Zhengyang Geng, Hongwu Peng, Jason D. Lee, Deming Chen, and Tri Dao. Medusa: Simple LLM inference acceleration framework with multiple decoding heads. In ICML, 2024.
[39] Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. EAGLE: Speculative sampling requires rethinking feature uncertainty. In ICML, 2024.
[40] Yichao Fu, Peter Bailis, Ion Stoica, and Hao Zhang. Break the sequential dependency of LLM inference using lookahead decoding. In ICML, 2024.
[41] Jun Zhang, Jue Wang, Huan Li, Lidan Shou, Ke Chen, Gang Chen, and Sharad Mehrotra. Draft & verify: Lossless large language model acceleration via self-speculative decoding. In ACL, 2024.
[42] Mostafa Elhoushi, Akshat Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, Ahmed A. Aly, Beidi Chen, and Carole-Jean Wu. LayerSkip: Enabling early exit inference and self-speculative decoding. In ACL, 2024.
[43] Jikai Wang, Yi Su, Juntao Li, Qingrong Xia, Zi Ye, Xinyu Duan, Zhefeng Wang, and Min Zhang. OPT-Tree: Speculative decoding with adaptive draft tree structure. TACL, 2025.
[44] Shuai Zhang, Huachuan Qiu, Hongliang He, and Yong Dai. Cost-aware diffusion draft trees for speculative decoding. arXiv preprint arXiv:2606.01813, 2026.
[45] Zixian Li, Tong Li, Chi Xie, Xiaohui Song, and Haonan Lu. From chains to trees: Parent-conditioned drafting for semi-autoregressive speculative decoding. arXiv preprint arXiv:2608.02123, 2026.
[46] Yangchao Wu, Zongyue Qin, Alex Wong, and Stefano Soatto. STree: Speculative tree decoding for hybrid state-space models. In NeurIPS, 2025.
[47] Benjamin Spector and Chris Ré. Accelerating LLM inference with staged speculative decoding. In ICML ES-FoMo Workshop, 2023.
[48] Hanshi Sun, Zhuoming Chen, Xinyu Yang, Yuandong Tian, and Beidi Chen. TriForce: Lossless acceleration of long sequence generation with hierarchical speculative decoding. In COLM, 2024.
[49] Evangelos Georganas, Dhiraj Kalamkar, Alexander Kozlov, and Alexander Heinecke. ML-SpecQD: Multi-level speculative decoding with quantized drafts. arXiv preprint arXiv:2503.13565, 2025.
[50] Juntao Zhao, Wenhao Lu, Sheng Wang, Lingpeng Kong, and Chuan Wu. QSpec: Speculative decoding with complementary quantization schemes. In EMNLP, 2025.
[51] Rishabh Tiwari, Haocheng Xi, Aditya Tomar, Coleman Hooper, Sehoon Kim, Maxwell Horton, Mahyar Najibi, Michael W. Mahoney, Kurt Keutzer, and Amir Gholami. QuantSpec: Self-speculative decoding with hierarchical quantized KV cache. In ICML, 2025.
[52] Moshik Hershcovitch, Andrew Wood, Leshem Choshen, Guy Girmonsky, Roy Leibovitz, Ilias Ennmouri, Michal Malka, Peter Chin, Swaminathan Sundararaman, and Danny Harnik. ZipNN: Lossless compression for AI models. In IEEE CLOUD, 2025.
[53] Tianyi Zhang, Mohsen Hariri, Shaochen Zhong, Vipin Chaudhary, Yang Sui, Xia Hu, and Anshumali Shrivastava. 70% size, 100% accuracy: Lossless LLM compression for efficient GPU inference via dynamic-length float (DFloat11). In NeurIPS, 2025.
[54] Ruibo Fan, Xiangrui Yu, Xinglin Pan, Zeyu Li, Weile Luo, Qiang Wang, Wei Wang, and Xiaowen Chu. ZipServ: Fast and memory-efficient LLM inference with hardware-aware lossless compression. In ASPLOS, 2026.
[55] Ivan Nikulin. Unweight: Lossless MLP weight compression for LLM inference. Technical Report Cf-TR-2026.04.v1, Cloudflare, Inc., 2026.

(a) Single Request, per Benchmark
(b) Batching, per Batch Size
Figure A1: Sealed gains over stock on unseen requests. (a) Single request, per benchmark. (b) Batching on H100, per batch size.

(a) Speedup over AR vs. Batch Size

(b) vs. Batch Size
Figure A2: Batching on H100, per batch size, measured on the interleaved bench. (a) Speedup over AR of stock and SpecPilot. (b) Tokens per step of stock and SpecPilot.
A Per-Benchmark and Per-Level Gains
Every sealed final beats stock on every benchmark and at every batch size (Figure A1). With one request, the gain ranges from on MT-Bench with DFlash2 on H100 to on MATH500 with DFlash2 on the RTX PRO 6000. With batching, the gain on Gemma-4-12B grows with the batch size, from at 16 requests to at 48, where EAGLE-3's stock slows down most.
The speedup over AR stays high as the batch size grows (Figure A2a). On FP8 Qwen3.8-27B, SpecPilot is faster than AR at 16 requests and at 24, against and for stock. On BF16 Qwen3.8-27B it reaches at 6 requests and at 10. SpecPilot also accepts more tokens per step than stock with batching, 5.2–5.6 against 4.5–4.6 on the FP8 target and 5.7–6.0 against about 4.6 in BF16 (Figure A2b).
In absolute terms, SpecPilot decodes 416–435 tokens/s for one request on H100 and 256–272 on the RTX PRO 6000, against about 50 and 26 for AR (Table A1). With 24 FP8 requests, each still decodes at 215 tokens/s, against 115 tokens/s for each stock request.
B Promotions on H100
Table A3 lists the fifteen promotions behind Figure 8. Kernel and byte work makes up most of the chain. The ceilings that opened each round match the shift described in §6.1. Computed with the oracle's and floors at full peak rates, before round one the ceiling split into a factor of , an overhead factor of and a kernel factor of . Before round two, the ceiling split into a factor of and a step-cost factor of , so step cost led.
Table A1: Decoding rates on the interleaved bench, in output tokens per second per request. Batched rows use Qwen3.8-27B in FP8 with DFlash2 on H100.
| Setting | AR | Stock | SpecPilot |
|---|---|---|---|
| Single request | |||
| Qwen3.8-27B, DFlash2, H100 | 49.9 | 183.9 | 416.1 |
| Qwen3.8-27B, DSpark, H100 | 49.9 | 172.7 | 435.3 |
| Qwen3.8-27B, DFlash2, PRO 6000 | 26.9 | 108.2 | 272.3 |
| Muse-Glimmer-30B, PRO 6000 | 25.7 | 110.6 | 255.6 |
| Batching | |||
| 16 requests | 64.6 | 135 | 243 |
| 20 requests | 63.4 | 121 | 224 |
| 24 requests | 61.4 | 115 | 215 |
Table A2: W12 encoding of dense BF16 checkpoints. Every tensor decodes bit for bit to the original weights.
| Model | Escape rate | Bits/weight |
|---|---|---|
| Llama-3.1-8B-Instruct | 12.015 | |
| Mistral-7B-Instruct-v0.3 | 12.018 | |
| DeepSeek-LLM-7B-Chat | 12.016 | |
| Gemma-4-12B | 12.016 | |
| Gemma-4-31B | 12.014 | |
| Muse-Glimmer-30B | 12.013 | |
| Qwen3.5-4B | 12.020 | |
| Qwen3.8-27B | 12.014 |
Table A3: Every promotion in the final lineage of single-request DFlash2 on Qwen3.8-27B (H100), in order, with its paired gain over the system it replaced. The sealed final is over stock.
| Round | Change | Gain |
|---|---|---|
| 1 | FP8 drafter, block-12 chain | |
| 1 | Tree verification (16 nodes) | |
| 1 | Wide tree (32 nodes) | |
| 2 | Skinny GEMM and fusion | |
| 2 | Certified LM head | |
| 2 | Kernel pre-staging | |
| 2 | GDN tree kernels (WY) | |
| 2 | W12 | |
| 2 | W12 pipeline tuning | |
| 3 | Tail-step skip | |
| 3 | INT4 drafter, fast accept | |
| 3 | W12 layout, edge calibration | |
| 3 | Two-level verification | |
| 3 | Prefill graphs, Q-pass gate | |
| 3 | Fused draft-to-exact hand-off |
Table A4: Cost of each completed round: wall-clock hours, GPU-hours recorded by the controller, code changes the agents created, and promotions. 27B denotes Qwen3.8-27B. Rows use the DFlash2 drafter unless noted otherwise.
| Setting | Hours | GPU-h | Changes | Promoted |
|---|---|---|---|---|
| Single request | ||||
| 27B, H100, round 1 | 11.7 | 28.3 | 26 | 4 |
| 27B, H100, rounds 2–3 | 19.3 | 57.3 | 103 | 13 |
| 27B DSpark, H100 | 13.6 | 27.3 | 25 | 4 |
| 27B, PRO 6000, round 1 | 7.0 | 24.3 | 26 | 1 |
| 27B, PRO 6000, round 2 | 10.4 | 37.4 | 18 | 4 |
| Muse-Glimmer, PRO 6000 | 16.3 | 73.9 | 58 | 8 |
| Batching, H100 | ||||
| 27B FP8 | 17.9 | 86.2 | 68 | 4 |
| 27B FP8, DSpark | 9.8 | 21.4 | 17 | 1 |
| 27B BF16, round 1 | 19.3 | 40.3 | 40 | 3 |
| 27B BF16, round 2 | 15.2 | 58.1 | 38 | 4 |
| Qwen3.5-4B | 9.7 | 20.2 | 19 | 2 |
| Gemma-4-12B, EAGLE-3 | 14.2 | 55.7 | 48 | 6 |
C Trees and Two-Level Verification
A TLV cycle of the final H100 system takes about 30 ms (Figure A3a). Its two drafts take 1.05 ms each, the Q pass over the 8-bit view of W12 takes 11.5 ms, the exact pass 14.9 ms, and the glue between them about 1.6 ms. In exchange, each exact pass accepts 11.67 tokens instead of 6.16 in a one-level step (Figure A3b).
The Q pass can read the 8-bit view nested in the W12 records, which costs no extra memory, or a separate low-precision copy (Table A5). Each view agrees with the exact pass on about 98% of positions, and each raised speed when it was promoted. On the RTX PRO 6000, TLV with split-KV attention gained in paired runs.

(a) One TLV Cycle on H100

(b) Per Exact Pass
Figure A3: Two-level verification of single-request DFlash2 on Qwen3.8-27B. (a) Time of one TLV cycle of the final system on H100. (b) Tokens accepted per exact pass in paired runs, with one level of verification and with TLV.

(a) AR Decoding Speedup vs. Batch Size

(b) W12 GEMM Speedup vs. Rows
Figure A4: W12 on H100. (a) AR decoding speedup of W12 over BF16 weights in SGLang versus batch size. (b) Speedup of the W12 GEMM over cuBLAS on Qwen3.8-27B projections versus rows, with cold L2.
D Cost of the Loop
A round takes 7–20 hours and 20–86 GPU-hours (Table A4). The thirteen completed rounds took 164 hours and 530 GPU-hours in total, created 486 code changes and promoted 54 of them. A setting reached in two rounds splits its work between them, and the second round starts from the final system of the first round.
E W12 Details
W12 encodes every dense checkpoint we tried, from six model families, at 12.013–12.020 bits per weight (Table A2). Fewer than of the weights fall outside their channel's 16-binade window, so the escape list stays small.
In AR decoding, W12 keeps its gain as the batch size grows, from 1.19–1.28× with one request to 1.13–1.20× with 32 (Figure A4a, Table A6). The freed memory goes to the KV cache, whose pool grows 2.03× on Qwen3.8-27B and 2.54× on Muse-Glimmer-30B. W12 is not tied to one serving engine. In Hugging Face Transformers with a static cache and CUDA graphs, it decodes Llama-3.1-8B 1.12× faster with one request.
The W12 GEMM beats cuBLAS on every Qwen3.8-27B projection from 1 to 32 rows (Figure A4b). The LM head, the largest matrix, gains most, 1.35–1.47×. With a warm L2, the speedups at up to 32 rows are 1.08–1.45×. On the RTX PRO 6000, which lacks wgmma, the W12 GEMM runs on mma. sync and beats cuBLAS on all 13 projection shapes of Qwen3.8-27B and Muse-Glimmer-30B,
Table A5: Weights read by the TLV Q pass: top-1 agreement with the exact pass over 104k teacher-forced positions on Qwen3.8-27B, and the paired gain when each view was promoted.
| Q view | Agreement | Deployment | Gain |
|---|---|---|---|
| Nested 8-bit (W12) | 0.983 | H100, DFlash2 | 1.037× |
| INT6 copy | 0.981 | H100, DSpark | 1.067× |
| INT6/INT8 copy | 0.984 | PRO 6000, DFlash2 | 1.081× |
Table A6: AR decoding in SGLang on H100, BF16 / W12: time per output token with 1 and 32 requests, weight memory, and the KV-pool growth with W12. W12 converts every decoder linear layer and the LM head.
| Model | TPOT (ms) | Weights (GB) | KV pool | |
|---|---|---|---|---|
| 1 req. | 32 req. | |||
| Muse-Glimmer-30B | 20.9 / 16.4 | 21.4 / 17.8 | 60.1 / 47.7 | 2.54× |
| Qwen3.8-27B | 19.1 / 15.6 | 23.6 / 20.5 | 51.1 / 39.8 | 2.03× |
| Gemma-4-12B | 10.2 / 8.5 | 11.8 / 10.5 | 23.1 / 20.0 | - |
| Llama-3.1-8B | 6.1 / 5.1 | 6.9 / 6.0 | 16.1 / 12.7 | - |
by 1.18–1.68× up to 32 rows and by 1.02–1.68× at 48 and 64 rows. Its time stays flat in the number of rows, while cuBLAS slows down from 8 rows on.
F Directions the Agents Closed
Table A7: Directions closed on a measured bound, single-request DFlash2 on Qwen3.8-27B on H100.
| Direction | Evidence | Result |
|---|---|---|
| Weights and kernels | ||
| 11-bit weights | microbench. | 3× slower decode |
| Persistent cross-GEMM W12 | microbench. | 196 vs 172 µs/layer |
| One-kernel GDN layer | microbench. | 32.3 vs 17.3 µs/layer |
| Width and verification | ||
| 48-node trees on W12 | timed | -4.3% |
| Three-level verification | replay | -2 to -12% |
| 7-bit nested Q view | replay | -3.8% |
| 6-bit nested Q view | replay | -17.5% |
The agents closed most directions on a measured bound (Table A7). Kernel directions failed because the W12 GEMM is bound by decode and SM issue rate. Trees wider than 32 nodes cost more than the lattice returned: on the W12 system, each node above 32 costs about 0.17 ms per step, against a value of about 0.063 ms. For the nested Q view, each eighth of its bytes removed cost about 0.01 of top-1 agreement, twice what the saved time bought back.