arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.02358cs.CLcs.AI
收藏

DiffuSpec:解锁扩散语言模型用于推测解码

DiffuSpec: Unlocking Diffusion Language Models for Speculative Decoding

SIGS, Tsinghua University(清华大学信号与系统系);Southern University of Science and Technology(南方科技大学);OPPO Research Institute(OPPO研究院)

Guanghao Li, Zhihui Fu, Min Fang, Qibin Zhao, Ming Tang, Chun Yuan, Jun Wang

AI总结:

针对大语言模型自回归解码延迟高的问题,提出无需训练的DiffuSpec框架,用扩散语言模型单次前向传播生成多token草稿,搭配因果一致性路径搜索和自适应草稿长度控制器,实现最高3倍解码加速。

摘要:

随着大语言模型(LLM)规模扩大,准确率有所提升,但解码的自回归(AR)特性会增加延迟,因为每个token都需要串行前向传播。推测解码通过使用快速草稿模型生成多token草稿,再由目标模型并行验证来解决这一问题。然而,许多部署仍依赖AR草稿模型,其串行传播限制了实际时钟时间的增益。我们重新审视草稿生成阶段,提出DiffuSpec——一个无需训练的即插即用框架,它使用预训练扩散语言模型(DLM)在单次前向传播中生成多token草稿,同时与标准AR验证器兼容。由于DLM草稿是在双向条件下生成的,并行的逐位置候选token构成token格,其中每个位置的局部最高概率token不一定形成从左到右的因果路径。此外,DLM草稿生成需要预先指定草稿长度,这会带来速度与质量的权衡。为应对这些挑战,我们引入两个实用组件:(i)在该格上进行的因果一致性路径搜索(CPS),用于提取与AR验证对齐的从左到右路径;(ii)自适应草稿长度(ADL)控制器,根据近期接受反馈和实际生成长度调整下一次的提议长度。在多个基准测试中,DiffuSpec实现了最高3倍的实际时钟速度提升,证明基于扩散的草稿生成是推测解码中AR草稿模型的可靠替代方案。

英文摘要:

As large language models (LLMs) scale up, accuracy improves, but the autoregressive (AR) nature of decoding increases latency since each token requires a serial forward pass. Speculative decoding addresses this by employing a fast drafter to propose multi-token drafts, which are then verified in parallel by the target model. However, many deployments still rely on AR drafters, where sequential passes limit wall-clock gains. We revisit the drafting stage and present DiffuSpec, a training-free drop-in framework that uses a pretrained diffusion language model (DLM) to produce multi-token drafts in a single forward pass, while remaining compatible with standard AR verifiers. Because DLM drafts are generated under bidirectional conditioning, parallel per-position candidates form a token lattice in which the locally highest-probability token at each position need not form a causal left-to-right path. Moreover, DLM drafting requires pre-specifying a draft length, inducing a speed-quality trade-off. To address these challenges, we introduce two practical components: (i) a causal-consistency path search (CPS) over this lattice that extracts a left-to-right path aligned with AR verification; and (ii) an adaptive draft-length (ADL) controller that adjusts next proposal size based on recent acceptance feedback and realized generated length. Across benchmarks, DiffuSpec yields up to 3x wall-clock speedup, establishing diffusion-based drafting as a robust alternative to autoregressive drafters for speculative decoding.

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

↑