Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Tan, Zhendong, Zhang, Xingjun, Hu, Chaoyi, Peng, Junjie, Xia, Kun
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:https://arxiv.org/abs/2512.02337
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911297786871808
author Tan, Zhendong
Zhang, Xingjun
Hu, Chaoyi
Peng, Junjie
Xia, Kun
author_facet Tan, Zhendong
Zhang, Xingjun
Hu, Chaoyi
Peng, Junjie
Xia, Kun
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2512_02337
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SpecPV: Improving Self-Speculative Decoding for Long-Context Generation via Partial Verification
Tan, Zhendong
Zhang, Xingjun
Hu, Chaoyi
Peng, Junjie
Xia, Kun
Machine Learning
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.
title SpecPV: Improving Self-Speculative Decoding for Long-Context Generation via Partial Verification
topic Machine Learning
url https://arxiv.org/abs/2512.02337