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

SimSD:扩散语言模型中的简单推测解码

SimSD: Simple Speculative Decoding in Diffusion Language Models

University of California San Diego(加州大学圣地亚哥分校);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Google(谷歌);University of California Santa Barbara(加州大学圣芭芭拉分校)

Junxia Cui, Haotian Ye, Runchu Tian, Hongcan Guo, Jinya Jiang, Haoru Li, Chaojie Ren, Yiming Huang, Kaijie Zhu, Zhongkai Yu, Kun Zhou, Jingbo Shang

AI总结:

针对扩散语言模型无法直接使用标准推测解码的问题,提出SimSD算法,通过即插即用的掩码策略引入参考令牌并设计注意力掩码,实现单次前向传播验证多个草稿令牌,在保持并行解码优势的同时提升解码吞吐量。

摘要:

扩散大语言模型(dLLMs)最近作为自回归(AR)LLMs的有前景替代方案出现,通过并行或块状解码实现更快的推理。然而,它们的掩码语言建模公式仍然与标准令牌级推测解码不兼容,而后者是AR模型最有效的加速技术之一。在AR解码中,因果掩码保留了时间上有效的令牌级上下文,使目标模型能够在单次前向传播中验证多个草稿令牌。相比之下,dLLMs依赖于掩码令牌和双向注意力,导致有效上下文在去噪步骤中发生变化,从而阻止了直接的令牌级推测验证。为了弥合这一差距,我们提出了一种简单但有效的扩散语言模型推测解码算法,名为SimSD,它主要采用即插即用的掩码策略,为dLLMs配备时间上有效的令牌级上下文以进行推测解码。我们的方法明确地从草稿模型预测中引入参考令牌,并设计了一种注意力掩码来调节它们与当前步骤令牌的交互,使dLLMs能够在单次前向传播中计算草稿令牌的有效logits。这恢复了AR模型中因果掩码提供的关键验证能力,同时保留了dLLMs的并行解码优势。所提出的方法无需训练,并且可以灵活地与其他加速技术(如KV缓存和块状解码)集成。在四个基准测试上的SDAR系列dLLMs实验表明,我们的方法实现了高达7.46倍的解码吞吐量提升,同时保持甚至提高了平均生成质量。

英文摘要:

Diffusion large language models (dLLMs) have recently emerged as a promising alternative to autoregressive (AR) LLMs, offering faster inference through parallel or blockwise decoding. However, their masked language modeling formulation remains incompatible with standard token-level speculative decoding, one of the most effective acceleration techniques for AR models. In AR decoding, the causal mask preserves temporally valid token-level contexts, enabling a target model to verify multiple drafted tokens in a single forward pass. In contrast, dLLMs rely on mask tokens and bidirectional attention, causing the effective context to change across denoising steps and preventing direct token-level speculative verification. To bridge this gap, we propose a simple but effective speculative decoding algorithm for diffusion language models, named SimSD, which mainly adopts a plug-and-play masking strategy that equips dLLMs with temporally valid token-level contexts for speculative decoding. Our method explicitly introduces reference tokens from draft-model predictions and designs an attention mask that regulates their interaction with current-step tokens, allowing dLLMs to compute valid logits for drafted tokens in a single forward pass. This restores the key verification ability provided by causal masking in AR models while preserving the parallel decoding advantages of dLLMs. The proposed method is training-free and can be flexibly integrated with other acceleration techniques such as KV cache and blockwise decoding. Experiments on SDAR-family dLLMs across four benchmarks show that our method achieves up to 7.46x higher decoding throughput while maintaining and even improving average generation quality.

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

↑