Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

SpecPV: Improving Self-Speculative Decoding for Long-Context Generation via Partial Verification

About

Growing demands from tasks like code generation, deep reasoning, and long-document understanding have made long-context generation a crucial capability for large language models (LLMs). Speculative decoding is one of the most direct and effective approaches for accelerating generation. It follows a draft-verify paradigm, where a lightweight draft model proposes several candidate tokens and the target model verifies them. However, we find that as the context length grows, verification becomes the dominant bottleneck. To further accelerate speculative decoding in long-context generation, we introduce SpecPV, a self-speculative decoding approach that performs fast verification using partial key-value states (KV) and periodically applies full verification to eliminate accumulated errors. We validate SpecPV across multiple long-context benchmarks and models, including LLaMA-3.1-8B-Instruct and Qwen3-series. Experimental results show that SpecPV achieves up to 6x decoding speedup over standard autoregressive decoding with minor degradation.

Zhendong Tan, Xingjun Zhang, Chaoyi Hu, Junjie Peng, Kun Xia• 2025

Related benchmarks

TaskDatasetResultRank
Long-context generationQwen3 Context length 10K
Throughput Speedup (α)2.76
12
Long-context generationQwen3 Context length 20K
Throughput Speedup (α)3.73
12
Long-context generationQwen3 Context length 30K
Throughput Speedup (α)4.37
12
Long-context generationQwen3 Context length 40K
Throughput Speedup (α)5.37
12
Long-context generationQwen3 Context length (50K)
Throughput Speedup (α)6.02
12
Long-context generationQwen3 Context length (60K)
Throughput Speedup (α)5.89
12
Long-context generationPG-19 10K context length
Throughput Speedup (micro-averaged)2.92
6
Long-context generationPG-19 20K context length
Throughput Speedup (micro)4
6
Long-context generationPG-19 30K context length
Throughput Speedup (micro)4.75
6
Long-context generationPG-19 40K context length
Throughput Speedup (micro)5.46
6
Showing 10 of 12 rows

Other info

Follow for update