Directly Maximizing On-policy Expected Accepted Length for Speculative Decoding
Abstract
Speculative decoding accelerates large language model inference by using a lightweight draft model to propose tokens for verification by a target model. Draft training commonly optimizes token-level distribution alignment, but this does not directly optimize the length of the accepted prefix: once a draft token is rejected, all subsequent draft tokens are discarded. We propose FreDraft, an on-policy training method that directly maximizes the expected accepted length of drafts sampled from the current draft model. This objective accounts for first-rejection truncation and induces prefix-aware credit assignment, weighting each token by its contribution to the acceptance of the current and subsequent tokens. To optimize the objective efficiently, we analytically marginalize token-level acceptance rate, using the target model's vocabulary distribution to reduce gradient variance. We further redistribute part of this distribution-level gradient into an explicit penalty for sampled tokens whose probabilities are overestimated by the draft model, while preserving the expected gradient. Experiments across multiple benchmarks and target models show that FreDraft improves accepted length and decoding speedup over strong baselines, achieving faster on-policy training convergence.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
Related papers
Look Back, Draft Ahead: Corrective Prefix Attention for Parallel Speculative Decoding
Shared title terminologycs.CLMohammad Mahdi Moradi, Ali Pourranjbar, Zongzuo Wang et al.
RCSD: Reinforcement and Continual Learning for Domain-Specific Speculative Decoding
Shared title terminologycs.CLMingkang Liu, Weiming Meng, Peipei Jiao et al.
Understanding Target Probability Reuse in Speculative Decoding
Shared title terminologycs.CLJungseob Lee, Giyoon Jang, Chailin Nam et al.
Target Regeneration Shrinks the Gains of Draft-Training Objectives in Speculative Decoding
Shared title terminologycs.CLJungseob Lee, Hogun Seong, Euijun Choi et al.
Capable Teacher, Myopic Scorer: Reward-Free Teacher Repair for Agentic On-Policy Distillation
Shared title terminologycs.CLShu Zhao, Tan Yu
On-Policy Transition Distillation
Shared title terminologycs.CLRunyang You, Yongqi Li, Tiezheng Yu et al.