Organizations: School of Artificial Intelligence, Nanjing University, China · National Key Laboratory for Novel Software Technology, Nanjing University, China · Nanjing University, China
The efficiency of Large Language Model (LLM) serving is fundamentally limited by the sequential nature of autoregressive decoding. Speculative Decoding (SD) mitigates this by using a lightweight draft model to speculate future tokens, which are then validated by the LLM in a single parallel forward pass. To further boost efficiency, multi-candidate schemes propose diverse candidate sets to increase the likelihood of token acceptance. However, we show that these schemes are bottlenecked by Residual Drift: a phenomenon where the rejection of initial candidates causes the residual target distribution to diverge from the draft model's predictions. This shift renders subsequent candidates ineffective and forces the system into expensive resampling. To resolve this, we propose ResiSpec, a framework that strategically reforms the proposal distribution during verification to anchor the residual target mass within the draft model's high-confidence regions. By mathematically re-aligning the verification process without compromising output exactness, ResiSpec prevents candidate obsolescence and achieves up to 1.92× speedup over state-of-the-art multi-candidate methods. Code is available at https://github.com/Czzzk/Resispec.
Figures & tables
Figure 1: The Decay of Acceptance Probability. Sequential candidate acceptance rates on CNN/DM using Llama-2-7B and Vicuna-7B ( Peng et al. 2023 ) as targets with Llama-68M as the draft. Across temperatures ( T∈{0.6,1.0} ), acceptance drops sharply after the first candidate, leaving later candidates with near-zero marginal utility.
Figure 2: Comparison of ResiSpec vs. standard multi-candidate verification. In traditional schemes, sequential rejections trigger Residual Drift, shifting the target distribution into regions mathematically incompatible with the draft model (red areas), causing candidates to become obsolete. ResiSpec mitigates this drift by employing an auxiliary proxy to reshape the residual distribution (green areas), re-aligning it with the draft model’s high-density support. This proximity ensures that pre-sampled candidates remain viable, effectively sustaining high acceptance rates across the entire verification batch.
Target LLM
Draft Model
T
Dataset
ResiSpec
SpecInfer
ResiSpec vs SpecInfer
Acc.↑
Thru.↑
Acc.↑
Thru.↑
Acc. Gain
Speedup
Llama-2-7B
JF68M
1
CNN/DM
4.68
96.43
2.51
57.29
1.86 ×
1.68 ×
Llama-2-7B
JF68M
1
OpenWebText
4.69
96.06
2.51
56.76
1.86 ×
1.69 ×
Llama-2-7B
JF68M
1
C4
4.67
96.90
2.64
61.02
1.77 ×
1.59 ×
Llama-2-7B
JF68M
0.6
CNN/DM
4.14
85.03
2.59
59.41
1.60 ×
1.43 ×
Llama-2-7B
JF68M
0.6
OpenWebText
4.16
85.62
2.49
56.48
1.67 ×
1.52 ×
Table 1: Performance comparison between ResiSpec and the baseline SpecInfer. Regarding the configuration of the tree, we use a 3-branch complete tree with a depth of 5. The results in the table are averaged over 200 runs to reduce variance and ensure statistical reliability. Experimental results demonstrate that ResiSpec significantly increased the accepted length (by up to 1.86 × ) and throughput (by up to 1.68 × ), validating its effectiveness in accelerating large language model inference.
Method
Acc. Len↑
Thru. (tok/s)↑
Acc. Len Gain
Speedup
Sequoia
3.07
88.14
–
–
Sequoia+ResiSpec
4.32
115.32
1.41 ×
1.31 ×
EAGLE
3.12
61.82
–
–
EAGLE+ResiSpec
3.85
71.17
1.23 ×
1.15 ×
Table 2: Compatibility of ResiSpec with existing multi-candidate speculative decoding methods at T=1.0 . ResiSpec is evaluated as an add-on to Sequoia ( Chen et al. 2024 ) and EAGLE ( Li et al. 2024b ) under matched decoding settings, improving both metrics.
Figure 3: Runtime analysis of ResiSpec. Left: per-step latency across SpecInfer, Sequoia, and EAGLE when augmented with ResiSpec, decomposed into drafting, target verification, and ResiSpec shaping. Right: ResiSpec’s internal runtime breakdown across budgeting, redistribution, and proxy formulation, shown by percentage.
Tree
Verification Costs
ResiSpec
SpecInfer
SpeedUp
Thru.↑
Thru.↑
d7b2
127
101.01
52.69
1.92 ×
d5b3
121
94.25
56.92
1.66 ×
d4b5
156
60.83
42.46
1.43 ×
d3b11
133
44.21
37.89
1.17 ×
Table 3: Impact of tree topologies under comparable verification budgets on Llama-2-7B with JF68M. Verification cost is the number of candidate positions verified concurrently. ResiSpec gains more over SpecInfer on deeper, narrower trees.
Method
Data
KL ( T=1.0 )
KL ( T=0.6 )
ResiSpec
CNN/DM
2.64e-10
4.38e-10
OpenWebText
7.15e-10
4.37e-10
C4
1.02e-9
1.39e-10
SpecInfer
CNN/DM
1.04e-9
3.55e-10
OpenWebText
1.63e-9
3.89e-10
C4
9.10e-10
1.09e-10
Table 4: KL divergence between the target distribution p(x) and the sampling distributions of ResiSpec and SpecInfer on Llama-2-7B with JF68M. Near-zero values across datasets and temperatures confirm distributional preservation.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Candidates ( N )
EAL↑
Marginal Gain ( Δ EAL)
Efficiency ( η )
1
1.89
-
-
2
2.17
0.28
0.280
4
2.48
0.31
0.155
8
2.76
0.28
0.070
Appendix
Table 5: Scaling Inefficiency of Multi-Candidate Schemes. With speculation depth fixed at 4, increasing candidates N yields only modest EAL gains while the efficiency score η drops sharply. Results are averaged over CNN/DM using Llama-2-7B.
Target
Draft
T
Data
Tree
Resi. Acc.
Resi. Thru.
Spec. Acc.
Spec. Thru.
Sheared-2.7B
Sheared-1.3B
1
CNN/DM
d5b3
4.88
78.309
3.88
66.313
Sheared-2.7B
Sheared-1.3B
1
CNN/DM
d4b4
3.94
82.988
3.42
76.695
Sheared-2.7B
Sheared-1.3B
1
OpenWebText
d5b3
4.86
78.447
3.92
67.660
Sheared-2.7B
Sheared-1.3B
1
OpenWebText
d4b4
3.95
83.060
3.45
76.864
Sheared-2.7B
Sheared-1.3B
1
C4
d5b3
4.84
78.362
3.98
68.679
Sheared-2.7B
Sheared-1.3B
1
C4
d4b4
3.95
82.850
3.44
77.340
Appendix
Table 6: Ablation Experiment Results of Different Model Pair Combinations. Here, we use Llama-2-7B and Sheared-LLaMA-2.7B ( Xia et al. 2023 ) as the target model and Sheared-LLaMA-1.3B, TinyLlama-1.1B ( Zhang et al. 2024b ) , Tiny-Vicuna-1B and JF68M as the draft model. The experimental results show that ResiSpec significantly outperforms SpecInfer in terms of accepted length and throughput under different configurations.
Speculative decoding (SD) accelerates autoregressive Large Language Models (LLMs) by drafting multiple tokens and verifying them in parallel, but it faces a scaling limitation: increasing the draft budget improves speed only when acceptance remains high and drafting overhead stays low. This ceiling has been difficult to break because prior head-based SD methods face a causality-efficiency dilemma. Autoregressive drafters produce path-conditioned candidates that are effective for tree speculative decoding with higher acceptance length, but their drafting cost grows with tree depth. Bidirectional block-diffusion drafters generate all positions in one pass, but their branch-agnostic marginals can form individually plausible yet mutually inconsistent trees, wasting budget and reducing acceptance. We propose JetSpec, a head-based SD framework that combines one-forward drafting efficiency with branch-wise causal conditioning. JetSpec trains a causal parallel draft head over fused hidden states from the frozen target model, producing candidate trees whose scores align with the target model's autoregressive factorization. This enables JetSpec to convert larger draft budgets into longer accepted prefixes and higher end-to-end speedup. Across math, coding, and chat benchmarks on dense and MoE Qwen3 models, JetSpec consistently outperforms bidirectional-head and tree-based SD baselines. On H100 GPUs, JetSpec achieves up to 9.64x speedup on MATH-500 and 4.58x on open-ended conversational workloads, with further latency gains demonstrated through vLLM integration under realistic serving loads. Our code and models are available at https://github.com/hao-ai-lab/JetSpec.
Speculative decoding accelerates autoregressive generation by letting draft tokens bypass full verification, but conventional frameworks suffer from frequent false rejections, particularly when draft models produce semantically correct but lexically divergent outputs. In this paper, we present Calibrated Speculative Decoding (CSD), a training-free framework that recovers valid tokens discarded by standard verification. Guided by the principle of "Frequency-Guided Candidate Selection and Probability-Guarded Acceptance," CSD incorporates two lightweight modules: Online Correction Memory, which aggregates historical rejections to propose recurring divergence patterns as rescue candidates, and Semantic Consistency Gating, which verifies candidate admissibility using probability ratios instead of exact token matching. Our evaluation across diverse large language models demonstrates that CSD outperforms existing methods, achieving a peak throughput speedup of 2.33x. CSD preserves model accuracy across all tasks while further boosting performance on complex reasoning datasets. These results establish CSD as a highly effective, lightweight solution for practical LLM deployments.
Xuwen Zhou, Fangxin Liu, Chao Wang +5
Shanghai Jiao Tong University · Alibaba Cloud Computing
Speculative decoding (SD) accelerates large language model (LLM) inference by using a lightweight draft model to propose tokens and a stronger target model to verify them. However, standard SD is mainly designed for acceleration, and its output quality is typically constrained by the target model. In this work, we propose Entropy-Aware Speculative Decoding (EASD), a lightweight and training-free extension of SD that improves reasoning quality through token-level entropy-guided rejection. EASD detects cases where both draft and target models exhibit high uncertainty while strongly overlapping in their top predictions. In such uncertain-agreement cases, EASD rejects the aligned token and resamples from the target distribution, preventing low-confidence errors from propagating. Experiments on challenging reasoning benchmarks show that EASD consistently improves accuracy over standard SD and reward-guided variants while maintaining comparable inference efficiency. Notably, EASD can surpass the standalone performance of the target model, suggesting that speculative decoding can serve not only as an acceleration method but also as an effective mechanism for improving reasoning quality. The code is available at https://github.com/ECNU-Text-Computing/EASD.
Tiancheng Su, Meicong Zhang, Guoxiu He
School of Economics and Management East China Normal University