arXiv:2511.22972cs.CL2025-11被引 12

不依赖训练,让大模型接受语义正确但词句不同的生成,大幅提速。

Training-Free Loosely Speculative Decoding: Accepting Semantically Correct Drafts Beyond Exact Match

  • 用目标模型自我修正能力判断草稿是否语义正确,放宽匹配标准。
  • 在Llama-3.1-70B上实现2.81倍加速,保持99%以上准确率。
  • 无需调参,适配任意模型对,特别适合跨领域任务。

大语言模型(LLM)推理延迟高,因自回归生成机制所致。推测解码(SPD)通过较小的草稿模型并行验证候选词来缓解此问题,但其严格要求完全匹配的验证机制会丢弃大量语义有效但表达不同的生成结果。现有基于训练的SPD方法在分布外(OOD)任务上常出现性能下降。为此,我们提出无需训练的宽松推测解码(FLy),利用目标模型的自我纠错能力判断草稿与目标不一致但仍语义正确的可能性。FLy采用双层机制:熵级门控识别当前词是否有多重合理选项或近乎确定;词级延迟窗口区分真实错误与语义等价但表达不同的变体。为进一步降低延迟,设计多层级加速策略,同时加速目标模型和草稿模型。由于无须训练,FLy可无缝适配任意草稿-目标模型对,并在模型与领域间泛化无需超参数重调。实验表明,FLy在保持目标模型99%以上准确率的同时,在Llama-3.1-70B-Instruct上实现平均2.81倍加速,在405B版本上达5.07倍加速。尤其在分布外数据集上仍高效,相比训练型方法EAGLE-3提升1.62倍。

原文摘要 · Abstract (English)

Large language models (LLMs) achieve strong performance across diverse tasks but suffer from high inference latency due to their autoregressive generation. Speculative Decoding (SPD) mitigates this issue by verifying candidate tokens in parallel from a smaller draft model, yet its strict exact-match verification discards many semantically valid continuations. Moreover, existing training-based SPD methods often suffer from performance degradation on out-of-distribution (OOD) tasks. To this end, we propose Training-Free Loosely Speculative Decoding (FLy), a novel method that loosens the rigid verification criterion by leveraging the target model's self-corrective behavior to judge whether a draft-target mismatch remains semantically valid. FLy introduces a two-tier mechanism: an entropy-level gate that identifies whether the current token allows multiple plausible alternatives or is nearly deterministic, and a token-level deferred window that distinguishes genuine errors from differently worded yet semantically correct variants. To further reduce latency, we design a multi-level acceleration strategy that accelerates not only the target model but also the drafter itself. Owing to its training-free design, FLy composes seamlessly with arbitrary draft-target pairs and generalizes across models and domains without hyperparameter re-tuning. Experiments show that FLy preserves more than 99% of the target model's accuracy while achieving an average 2.81x speedup on Llama-3.1-70B-Instruct and 5.07x speedup on the 405B variant. Notably, on out-of-domain datasets, our method remains highly effective and outperforms the training-based method EAGLE-3 by 1.62x.

推理加速推测解码大模型语义对齐

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