arXiv:2510.02358cs.CLcs.AI2025-10ACL被引 34

用扩散模型生成多词草稿,实现三倍加速的并行解码。

DiffuSpec: Unlocking Diffusion Language Models for Speculative Decoding

  • 用预训练扩散语言模型一次生成多词草稿,突破串行限制。
  • 在多个基准上实现最高3倍的墙钟速度提升。
  • 兼容传统自回归验证器,适合部署于现有推理系统。

随着大语言模型规模扩大,准确率提升,但自回归解码因逐个词生成导致延迟增加。推测解码通过快速草稿模型生成多词草案,并由目标模型并行验证来缓解此问题。然而,多数部署仍依赖自回归草稿模型,其串行计算限制了实际加速效果。本文提出 DiffuSpec,一种无需训练的即插即用框架,利用预训练扩散语言模型(DLM)在单次前向传播中生成多词草案,同时保持与标准自回归验证器的兼容性。由于 DLM 在双向条件下的生成方式,每个位置可形成候选词的网格结构,局部最优词不一定构成因果左到右路径。此外,草稿长度需预先设定,带来速度与质量的权衡。为此,我们引入两个实用组件:(i) 在网格中进行因果一致性路径搜索(CPS),提取与自回归验证对齐的左到右路径;(ii) 自适应草稿长度控制器(ADL),根据近期接受率和实际生成长度动态调整下一轮草案大小。在多个基准测试中,DiffuSpec 实现最高达 3 倍的墙钟速度提升,确立基于扩散模型的草稿生成是自回归草稿器的稳健替代方案。

原文摘要 · Abstract (English)

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.

扩散模型推测解码推理加速

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