arXiv:2509.24328cs.CL2025-09中稿 · ACL被引 3

通过动态预测猜测准确率,提升大模型推理效率。

Speculative Verification: Exploiting Information Gain to Refine Speculative Decoding

  • 引入辅助模型评估猜测与目标模型的分布对齐度。
  • 在大批次下平均提速1.4倍,最高达2倍。
  • 无需修改原有模型,适配多种大模型部署场景。

大语言模型因自回归解码导致GPU效率低、延迟高。推测解码(SD)利用小型草稿模型预生成多个词元,并由目标模型并行验证以缓解此问题。然而当推测准确率低时,被拒绝词元带来的开销会抵消收益,尤其在大批次下限制了性能。为此,我们提出推测验证(SV),一种高效增强方案:动态预测推测准确率,并自适应调整验证长度以最大化吞吐量。SV引入一个与草稿模型规模相近的辅助模型,估算草稿与目标模型分布的对齐程度。通过最大化该对齐的信息增益,优化验证决策,减少对被拒词元的无效计算,提升解码效率。此外,SV无需修改草稿或目标模型,兼容现有SD变体。我们在三种NLP任务上,使用九组不同组合的草稿、辅助和目标模型(包括13B-72B目标模型)进行了广泛评估,涵盖基础版(无微调)、指令微调版和任务微调版。在所有实验和批次大小(4-80)下,SV均优于标准解码和原始SD,在大批次(32-80)中平均提速1.4倍,最高提升2倍。结果表明,SV具有强鲁棒性、可扩展性和实际应用价值。

原文摘要 · Abstract (English)

LLMs have low GPU efficiency and high latency due to autoregressive decoding. Speculative decoding (SD) mitigates this using a small draft model to speculatively generate multiple tokens, which are then verified in parallel by a target model. However, when speculation accuracy is low, the overhead from rejected tokens can offset the benefits, limiting SD's effectiveness, especially at large batch sizes. To address this, we propose Speculative Verification (SV), an efficient augmentation to SD that dynamically predicts speculation accuracy and adapts the verification length to maximize throughput. SV introduces a companion model - a small auxiliary model similar in size to the draft model - to estimate the alignment between draft and target model distributions. By maximizing the information gain from quantifying this alignment, SV refines verification decisions, reducing wasted computation on rejected tokens and improving decoding efficiency. Moreover, SV requires no modifications to the draft or target models and is compatible with existing SD variants. We extensively evaluated SV on publicly available LLMs across three NLP tasks using nine combinations of draft, companion, and target models, including 13B-72B target models and three types of variations: base (no finetuning), instruction-tuned, and task fine-tuned. Across all experiments and batch sizes (4-80), SV consistently outperforms both SD and standard decoding with the target model. It improves SD performance by up to 2$\times$, with an average speedup of 1.4 $\times$ in large-batch settings (batch sizes 32-80). These results demonstrate SV's robustness, scalability, and practical utility for efficient LLM inference.

大模型推理推测解码效率优化信息增益

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。