SpecBound: Adaptive Bounded Self-Speculation with Layer-wise Confidence Calibration
Authors: Zhuofan Wen, Yang Feng
Organizations: Key Laboratory of Intelligent Information Processing, Institute of Computing Technology, Chinese Academy of Sciences (ICT/CAS) · State Key Laboratory of AI Safety, Institute of Computing Technology, Chinese Academy of Sciences · University of Chinese Academy of Sciences, Beijing, China
Speculative decoding has emerged as a promising approach to accelerate autoregressive inference in large language models (LLMs). Self-draft methods, which leverage the base LLM itself for speculation, avoid the overhead of auxiliary draft models but face limitations: shallow layers often produce overconfident yet incorrect token predictions, and the presence of difficult tokens in a draft sequence forces redundant computation through deeper layers, undermining both draft acceptance and overall speedup. To address these issues, we propose a novel self-draft framework that suppresses spurious confidence via layer-wise temperature annealing in early-exit decision and adaptively bounds speculation length based on token-wise decoding difficulty. By reprocessing the hidden states of draft tokens in a unified parallel pass through deep layers, our method maintains exact output equivalence with the original model while maximizing computational efficiency. It requires no modifications to the base LLM parameters and achieves up to 2.33x wall-time speedup over standard autoregressive decoding across diverse long-form generation tasks and multiple model architectures.
Figures & tables
Figure 1: Layer-wise token prediction and confidence of a segment with the MT-Bench prompt. Each cell shows the greedy-decoded token and its confidence (color intensity: darker = higher probability) at a given layer. Gray cells indicate that the token has already correctly exited at an earlier layer and is no longer considered for early-exit decisions. This figure reveals the issues of spurious high-confidence predictions and heterogeneous exit depths.
Figure 2: Left: Overview of the BSCS algorithm under the setting dmax=6 and wmax=4 . When token “a” fails to exit by layer 6, speculation is terminated. All hidden states of previously generated tokens (“I”, “am”, “a”) are concatenated and passed to the remaining layers for parallel verification. Right: Detailed illustration of per-token layer-wise computation and hidden-state cache management.
Method
Math
Multi.
QA
RAG
Sum.
Trans.
Overall
CR
SD
CR
SD
CR
SD
CR
SD
CR
SD
CR
SD
Vicuna-7B
Lookahead Fu et al. (2024)
1.92
1.54 ×
1.74
1.49 ×
1.52
1.23 ×
1.53
1.24 ×
1.57
1.38 ×
1.28
1.16 ×
1.35 ×
Medusa Cai et al. (2023)
1.77
1.96 ×
1.72
1.95 ×
1.54
1.67 ×
1.47
1.47 ×
1.53
1.59 ×
1.55
1.63 ×
1.71 ×
REST He et al. (2024)
1.49
1.19 ×
2.04
1.65 ×
1.87
1.64 ×
1.96
1.75 ×
1.60
1.34 ×
1.58
1.33 ×
1.47 ×
Kangaroo Liu et al. (2024)
2.14
1.61 ×
2.22
1.68 ×
1.87
1.43 ×
2.05
1.52 ×
1.87
1.50 ×
1.41
1.24 ×
1.50 ×
Table 1: Performance comparison of SpecBound against other self-drafting methods across multiple base models and diverse text generation tasks on Spec-Bench. We report compression rate (CR, average accepted tokens per draft round) and wall-time speedup (SD) relative to autoregressive decoding.
Figure 3: Hyperparameter Sensitivity Analysis on Vicuna-7B: wall-time speedup (blue) and compression rate (CR, orange) under varying exit threshold γ , annealing coefficient α , depth bound dmax , and width bound wmax .
Figure 4: Ablation study of SpecBound components on wall-time speedup across different base models, comparing the full method against variants that removing the Annealed Confidence Threshold early exit mechanism, the depth bound dmax , or the width bound wmax .
Method
Math
Multi.
QA
RAG
Sum.
Trans.
Overall
greedy decoding
1.89 ×
1.65 ×
2.16 ×
2.31 ×
1.95 ×
2.94 ×
2.15 ×
temperature sampling (T=0.3)
1.82 ×
1.56 ×
2.01 ×
2.20 ×
1.86 ×
2.86 ×
2.08 ×
temperature sampling (T=1.0)
1.71 ×
1.44 ×
1.92 ×
2.08 ×
1.73 ×
2.63 ×
1.88 ×
top-p sampling (p=0.9)
1.78 ×
1.48 ×
1.99 ×
2.15 ×
1.78 ×
2.71 ×
1.94 ×
Table 2: Speedup performance of SpecBound (Vicuna-7B) under different decoding strategies on different tasks of Spec-Bench. We choose greedy docoding, temperature sampling and top-p sampling with different settings.
Metric
AR (Base)
Ours
Improv.
TTFT (ms)
20.8
21.1
-
Per-token latency (ms)
17.5
8.8
1.98 ×
Throughput (tokens/s)
57.3
123.1
2.15 ×
End-to-End Latency (s)
3.31
1.89
1.75 ×
Table 3: Serving latency metrics comparison on Vicuna-7B using a single NVIDIA H800 GPU. "AR" denotes standard autoregressive decoding.
Figure 5: Left: Overview of the BSCS algorithm under the setting dmax=6 and wmax=4 . When token “chat” successfully exits at layer 2 and the total draft length reaches the width bound wmax , speculation is terminated. All hidden states of previously generated tokens (“I”, “am”, “a”, “chat”) are concatenated and passed to the remaining layers for parallel verification. Right: Detailed illustration of per-token layer-wise computation and hidden-state cache management.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Device
Math
Multi-turn
QA
RAG
Summary
Translation
Overall
H800
1.89 ×
1.65 ×
2.16 ×
2.31 ×
1.95 ×
2.94 ×
2.15 ×
RTX 3090
1.81 ×
1.58 ×
2.12 ×
2.13 ×
1.92 ×
2.69 ×
2.01 ×
Appendix
Table 4: Speedup performance of SpecBound (Vicuna-7B) on different GPU devices across various Spec-Bench tasks. The evaluation are conducted on H800 and RTX 3090 with all other settings are the same.
Speedup Range
Number
Percentage
3.54×−4.16× (Max)
16
3.33%
2.93×−3.54×
48
10.00%
2.31×−2.93×
103
21.46%
1.69×−2.31×
197
41.04%
1.07× (Min) −1.69×
116
24.17%
Appendix
Table 5: Empirical speedup distribution of SpecBound on Vicuna-7B across 480 prompts from SpecBench.