AI guides

D-PACE improves average speculative-decoding speedups by 8%–9.7% in Qwen3-4B tests

By 吴天宇、姚瑀、李巨、杜逸伦0 viewsSource: 机器之心
D-PACE improves average speculative-decoding speedups by 8%–9.7% in Qwen3-4B tests

A Harvard–MIT team replaces DFlash's training loss with dynamic position weights. Across six Qwen3-4B benchmarks, average measured speedups improve by 8%–9.7% relative to DFlash. Separate 8B results concern emitted length; H200 training-step overhead rises about 2.3%.

Editor's verification: The 8%–9.7% gain comes from the paper's measured speedups relative to DFlash on Qwen3-4B, across six benchmarks, two drafter depths and the specified decoding settings. Measurements used an L40S; the result does not mean all models or services receive the same speed improvement. The separately listed 12.5% and 12.8% gains for 8B models concern tokens emitted per round, while 2.3% on the H200 is the overhead per training step. The paper's experimental tables call τ the average emitted length; this should be distinguished from X, the accepted draft length used in the derivation.

How should we train the small drafter model in speculative decoding? A Harvard–MIT team's answer is to change just one loss: D-PACE, or Dynamic Position-Aware Cross-Entropy. The work has been selected as a NeurIPS 2026 Spotlight.

This loss is already being used in industry: Meta's recently released on-device foundation model, Muse Glimmer 30B, states in its technical report that its DFlash drafter was trained with D-PACE. NVIDIA Model Optimizer and DFlash 2 make it the default training loss for DFlash. The drafter-training frameworks from vLLM and SGLang support it, while companies including Baidu, Tencent and Alibaba have also adopted it in their speculative-drafter training or research.

D-PACE does not change the model architecture or inference code, and adds only 2.3% to the time per training step. On Qwen3-4B, the average measured speedup across six benchmarks improves by 8.0%–9.7% relative to DFlash. On Llama-3.1-8B-Instruct and Qwen3-8B, using three-layer drafters and greedy decoding, average accepted length improves by about 12.5% and 12.8%, respectively.

The paper is a collaboration between Harvard University and MIT. Tianyu Wu and Yu Yao are co-first authors, jointly advised by Ju Li and Yilun Du.

Article illustration

  • Paper title: D-PACE: Dynamic Position-Aware Cross-Entropy for Parallel Speculative Drafting
  • Authors: Tianyu Wu and Yu Yao are co-first authors, jointly advised by Ju Li and Yilun Du
  • Paper: https://arxiv.org/abs/2605.18810
  • Code: https://github.com/Lucas-TY/D-PACE
  • NeurIPS page: https://neurips.cc/virtual/2026/poster/152718
  • Muse Glimmer 30B technical report: https://arxiv.org/abs/2610.24628

Background: predicting a whole block at once, with weights fixed in advance

The basic idea of speculative decoding is to let a lightweight drafter predict several tokens at once, then use one forward pass of the target model to verify them in parallel without loss of generation quality. Its speed depends on two things: the drafter must predict quickly, and its predictions must be accurate.

Drafters broadly follow two approaches to those goals:

  • Autoregressive drafters, such as the EAGLE family, predict tokens one by one. They can model dependencies between tokens, but each additional prediction requires another serial pass. Latency constraints therefore tend to limit them to very shallow networks;

  • Block-diffusion parallel drafters, such as DFlash, use a lightweight block-diffusion model conditioned on the target model's hidden-layer features to predict an entire block in one forward pass. Their runtime does not generally grow linearly with block size. Under the same latency budget, the network can be deeper—the paper tests three and five layers—and blocks can be longer.

DFlash is already a commonly used parallel drafter in the open-source community. Meta's Muse Glimmer 30B technical report describes it as a leading current open-source approach.

Although a block is drafted in parallel, verification still checks its positions from left to right. Once a position fails, all predictions from that point onward are discarded. DFlash training computes a cross-entropy term for every position in the block, with fixed position-decaying weights: later positions receive smaller weights, and those weights never change during training. This creates two problems:

  • By the middle and later stages of training, the first few positions are already highly accurate. Later positions are the real bottleneck for accepted length, but the fixed weights do not shift backward accordingly;

  • For an individual example, if the first few positions have already been predicted incorrectly, later positions never get a chance during verification. Training signal allocated to them is effectively wasted.

D-PACE's idea is: since the final aim is to accept more tokens per round, derive a weight for every position from the expected accepted length.

The method: deriving dynamic weights from expected accepted length

Turning "how many tokens are accepted on average" into a trainable objective

For the fifth token to be accepted, all four preceding tokens must first pass. Thus, the probability of "accepting at least five" is the product of the per-position acceptance probabilities for the first five positions, each conditional on all preceding positions having passed. Summing the probabilities of "accepting at least one," "accepting at least two," and so on up to "accepting the whole block" gives the average number of tokens accepted: the expected accepted length.

The target model's true acceptance probabilities are unavailable during training. Drawing on EAGLE-2's observation that drafter confidence correlates with actual acceptance rate, D-PACE substitutes the probability the drafter assigns to the correct token for the acceptance probability. This gives a differentiable approximation to expected accepted length.

Measured block by block on MATH-500, the rank correlation between this approximate objective and measured accepted length reaches 0.84, above the 0.79 obtained by adding the confidence values across positions.

Article illustration

Left: the approximate objective correlates strongly with accepted length, with a rank correlation of 0.84 on MATH-500. Right: average accepted length for four configurations under greedy decoding.

Differentiation: splitting each position's weight into two factors

Differentiating the approximate objective produces a gradient that can be written precisely in a weighted cross-entropy form: each position's cross-entropy is multiplied by a weight, which D-PACE uses to allocate training signal across positions. That weight is the product of two components:

  • Cumulative confidence: multiply the confidence values from position one through the current position, approximating the probability that all positions up to and including this one pass;

  • Continuation value: count one for this position itself, then add the average number of further tokens that can be accepted after it is accepted.

These two components address the two problems above. If earlier predictions in an example are wrong, cumulative confidence automatically reduces the weights for later positions. Once the early positions are trained accurately, cumulative confidence approaches one, and continuation value largely determines the weights. Compared with early training, the weights gradually move toward later bottleneck positions. The entire calculation uses only the drafter's own output probabilities; it requires no extra target-model run.

Article illustration

Left: DFlash uses fixed decay by position. Right: each D-PACE position weight is the product of cumulative confidence and continuation value.

Asymmetric smoothing: smooth the weights, leave cross-entropy unchanged

At the start of training, confidence is generally low. Multiplying several confidence values makes the product nearly zero, leaving later positions with almost no weight. When calculating weights, D-PACE first pulls each confidence value toward one—halfway by default, so 0.2, for example, is treated as 0.6. Their product then does not immediately collapse to zero.

The cross-entropy term still uses the original, unsmoothed probabilities. Smoothing affects only the weights, hence "asymmetric." The weights themselves are treated solely as coefficients, without gradients propagating through them. On a single H200, training time per step rises from 173 milliseconds to 177 milliseconds, an overhead of just 2.3%.

Why not optimize accepted length directly?

Since the approximate objective correlates so closely with measured accepted length, could it simply be maximized directly as the loss? The paper tried it, and training collapsed. With a three-layer drafter and greedy decoding, average accepted length was just 1.03, meaning almost all the drafter's predictions were rejected. The speedup was 0.77×, slower than running without speculative decoding. Removing smoothing from D-PACE also causes collapse, showing that smoothing is indispensable.

The paper offers two explanations. First, direct optimization mixes "predicting tokens correctly" and "each position's contribution to accepted length" in the same gradient. Second, without smoothing, low confidence at an earlier position suppresses the training signal for all later positions. D-PACE separates the two: the approximate objective is used only to calculate weights. The model is still updated through per-token cross-entropy, simply multiplied by that position's weight.

Weights change with training and with the example

Article illustration

(a) Positional weight distributions at different stages of training; (b) positional weights across 10 consecutive steps midway through the first epoch; (c) training curves and ablations for average accepted length on MATH-500, with a three-layer drafter and greedy decoding.

At every stage of training, D-PACE's weights are more concentrated on the first few positions than DFlash's, prioritizing accuracy there. Relative to D-PACE's own early training, however, the weights gradually shift toward later positions as training proceeds, and they differ from example to example.

Experimental results: outperforming DFlash in every tested setting,

with larger gains for larger blocks

The main experiments use Qwen3-4B as the target model and train three-layer and five-layer DFlash drafters. They evaluate six benchmarks covering mathematics, code and conversation, using both greedy decoding and sampling.

Article illustration

Main Qwen3-4B results: 3L/5L indicate drafter depth. T=0/1 correspond to greedy decoding and sampling, respectively. SR is the measured speedup on an L40S, and τ is the average emitted length reported in the paper.

In every tested setting, D-PACE's measured speedup and average accepted length exceed DFlash's: average speedup improves by 8.0%–9.7%, and average accepted length by 8.5%–10.7%. For example, with a three-layer drafter and greedy decoding, average speedup rises from 2.93× to 3.20×, while average accepted length rises from 4.10 to 4.52. The highest speedup in the table is for MATH-500 with five layers and greedy decoding, increasing from 3.96× to 4.47×.

The gains are larger on two 8B models. Again using a three-layer drafter and greedy decoding, average accepted length improves by about 12.5% on Llama-3.1-8B-Instruct and 12.8% on Qwen3-8B, exceeding DFlash on every benchmark.

Block size also has a clear effect. For the three-layer Qwen3-4B drafter, block sizes of 8, 12 and 16 yield average accepted-length gains of 5.2%, 8.3% and 10.2%, respectively. The intuitive explanation is that larger blocks leave later positions more vulnerable to earlier mistakes, making fixed weights less accurately allocated.

Looking at training on MATH-500 with Qwen3-4B, a three-layer drafter and greedy decoding, D-PACE's average accepted length remains about 12% above DFlash's throughout all nine epochs. Ablations show that cumulative confidence alone delivers a 10%–12% gain over DFlash in each epoch, making it the main source of improvement. Continuation value provides a smaller additional gain.

Practical value: change only the loss,

and existing drafter-training pipelines can use it

For teams already training DFlash-style drafters, D-PACE requires no change to the drafter architecture or inference procedure. They can use it by replacing the training loss. Accepting a few more tokens in each inference round lets the same target model generate faster.

NVIDIA Model Optimizer now makes D-PACE the default training loss for DFlash, as does DFlash 2. Major open-source training frameworks, including vLLM Speculators and SGLang SpecForge, also support D-PACE. Section 7.2 of Meta's Muse Glimmer 30B technical report states that its DFlash drafter is trained offline on responses generated by the target model itself, using D-PACE as the objective. Teams including Baidu's ERNIE, Tencent Hunyuan, Alibaba MNN and Reflection have also adopted D-PACE in their speculative-drafter training or research.

About the authors:

Tianyu Wu is a second-year master's student in Computational Science and Engineering at Harvard University.

Yu Yao is a PhD student at the Massachusetts Institute of Technology (MIT).

Ju Li is a professor of Computational Science and Engineering, Nuclear Science and Engineering, and Materials Science and Engineering at MIT.

Yilun Du is an assistant professor at Harvard University's Kempner Institute and Department of Computer Science, where he leads the Embodied Minds Lab.

This article is from "Synced," by "Tianyu Wu, Yu Yao, Ju Li and Yilun Du."

Related topics

After reading

Join the AINRK community

Read how to join the community and connect with people working in AI.

Community information (opens in a new tab)