arXiv:2609.02897cs.CL2026-09

不依赖训练,动态调整生成策略,显著提升大模型推理速度

Margins, Not Windows: Training-Free Per-Step Lossy Speculative Decoding

论文配图:Margins, Not Windows: Training-Free Per-Step Lossy Speculative Decoding
图 1 · 摘自论文原文
  • 根据每步预测置信度自动调整验证规则和树结构
  • 吞吐量最高提升56%,任务准确率保持93%以上
  • 适合生产环境部署,兼容多种主流大模型

推测式解码通过并行生成候选词并验证来加速大模型推理。现有方法如EAGLE-3广泛采用树形注意力机制,但通常固定两个决策:严格匹配验证规则和静态草稿树结构。此前工作仅分别放宽其中一项,受限于长草稿链或固定预算。本文提出AdaptiveSpec,一种无需训练的逐步推测式解码方法,可同时自适应这两个决策。基于解码过程中产生的内部信号,每步边际规则在目标概率与草稿词概率比值超过阈值时允许不匹配的草稿词,不依赖草稿长度或起草器架构;每步树策略则直接由草稿最高概率置信度与滚动接受历史融合信号决定,动态调整树的深度、宽度与节点数,使总草稿数可变而非仅重分配。两项适应机制正交且叠加增效。在SGLang生产级服务引擎上实现,相比当前最优自回归推测解码方法EAGLE-3,吞吐量最高提升56%,在GSM8K、MATH-500、HumanEval三个数据集上对三种目标模型(DeepSeek-R1-Distill-Llama-8B、Llama-3.1-8B-Instruct、Qwen3-8B)恢复93%至全无损任务准确率。

原文摘要 · Abstract (English)

Speculative decoding accelerates LLM inference by drafting candidate tokens and verifying them in parallel. Tree-attention drafters such as EAGLE-3 are widely adopted, yet typically hold two decisions fixed: (1) a strict token-match verification rule and (2) a static draft-tree shape. Prior work relaxes each in isolation under limiting assumptions: long draft chains for training-free lossy verification, and adaptive tree shaping under a fixed token budget. We introduce AdaptiveSpec, a training-free per-step speculative decoding method that adapts both decisions from internal signals already produced during decoding. A per-step margin rule promotes a mismatched draft-proposed token when the ratio of the target's probability on the drafted token to its top-1 probability exceeds a threshold with no dependence on draft length or underlying drafter architecture. A per-step tree policy adjusts the draft tree's depth, width, and node count directly from a fused signal of draft top-1 confidence and a rolling acceptance history capturing recent draft-target agreement, allowing the total draft count to vary rather than only be redistributed. The two adaptations operate on orthogonal axes and compound in effect. Implemented on the SGLang production-grade serving engine, AdaptiveSpec improves throughput over the state-of-the-art autoregressive speculative decoding method EAGLE-3 by up to 56%, recovering 93% to fully lossless task accuracy across GSM8K, MATH-500, and HumanEval on three target models (DeepSeek-R1-Distill-Llama-8B, Llama-3.1-8B-Instruct, Qwen3-8B).

大模型推理推测解码性能优化

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