arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.13161cs.CL
收藏

镜像推测解码:突破LLM推理中的串行壁垒

Mirror Speculative Decoding: Breaking the Serial Barrier in LLM Inference

Apple(苹果公司)

Nikhil Bhendawade, Kumari Nishu, Arnav Kundu, Chris Bartels, Minsik Cho, Irina Belousova

AI总结:

镜像推测解码通过并行异构执行和多令牌推测流式传输,突破LLM推理中的延迟-接受度权衡,实现高接受度低开销的高效推理。

摘要:

推测解码通过使用草案模型向前预测来加速LLM推理,但其收益受到自回归草案生成成本的限制:增加草案大小会提高接受率但引入额外的延迟开销,加剧了速度-准确性权衡。先前方法(Medusa、Hydra、EAGLE)部分降低了草案成本,但要么降低接受度或引入限制扩展的开销。我们提出了镜像推测解码(Mirror-SD),一种推理算法,突破了延迟-接受度权衡。Mirror-SD并行启动分支完成滚出,从早期退出信号与目标模型的后缀同时进行,并显式地在异构加速器(GPU和NPU)之间映射计算以利用跨设备并行性。草案为目标预测向前延续以验证,同时目标同时为草案预测修正路径,将推测转化为两个互补的执行管道。为进一步减少草案延迟而不削弱接受语义,我们添加了推测流式传输,使草案每步发射多个令牌。这种并行异构执行加多令牌推测流式的双策略将推测解码推向其理想的高接受度低开销的领域。在SpecBench上使用从14B到66B参数的服务器级模型,Mirror-SD实现了稳定的端到端收益,在多样任务中实现了2.8倍至5.8倍的运行时间加速,并在最强基线EAGLE3上平均相对改进达30%。

英文摘要:

Speculative decoding accelerates LLM inference by using a draft model to look ahead, but gains are capped by the cost of autoregressive draft generation: increasing draft size elevates acceptance rates but introduces additional latency overhead exacerbating the speed-accuracy tradeoff. Prior methods (Medusa, Hydra, EAGLE) partially reduce draft cost but either degrade acceptance or introduce overheads that limit scaling. We present Mirror Speculative Decoding (Mirror-SD), an inference algorithm that breaks the latency-acceptance tradeoff. Mirror-SD launches branch-complete rollouts from early-exit signals in parallel with the target model's suffix and explicitly maps computation across heterogeneous accelerators (GPU and NPU) to exploit cross-device parallelism. The draft speculates forward continuations for the target to verify, while the target simultaneously speculates correction paths for the draft, converting speculation into two complementary execution pipelines. To further cut draft latency without weakening acceptance semantics, we add speculative streaming so the draft emits multiple tokens per step. This dual strategy of parallel heterogeneous execution plus multi-token speculative streaming pushes speculative decoding toward its ideal regime of high acceptance with low overhead. On SpecBench with server-scale models from 14B to 66B parameters, Mirror-SD delivers consistent end-to-end gains, achieving 2.8x-5.8x wall-time speedups across diverse tasks and a 30% average relative improvement over the strongest baseline, EAGLE3.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑