SimSD:扩散语言模型的简单推测解码方法
SimSD: Simple Speculative Decoding in Diffusion Language Models
扩散语言模型终于有了实用的推测解码方案,做模型推理加速的团队可以直接集成SimSD,无需额外训练就能获得数倍吞吐提升,值得关注。
扩散大语言模型(dLLMs)作为自回归(AR)模型的替代方案,通过并行或块解码实现更快推理,但其掩码语言建模公式与标准token级推测解码不兼容。
AR模型利用因果掩码实现单次前向验证多个草稿token,而dLLMs依赖掩码token和双向注意力,导致有效上下文随去噪步骤变化,无法直接进行token级推测验证。为此,研究者提出SimSD,一种简单有效的推测解码算法,采用即插即用的掩码策略,为dLLMs提供时间上有效的token级上下文。
该方法显式引入草稿模型的参考token,并设计注意力掩码调节其与当前步骤token的交互,使dLLMs能在单次前向前向计算草稿token的有效logits,恢复AR模型的验证能力同时保持dLLMs的并行解码优势。SimSD无需训练,可灵活集成KV缓存和块解码等加速技术,在四个基准测试中实现高达7.
46倍的解码吞吐量提升,同时保持甚至改善平均生成质量。
SimSD: Simple Speculative Decoding in Diffusion Language Models
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.
This report is categorized under AITOP's "Papers" desk. Key entities and technical topics under continuous tracking include speculative decoding, diffusion language models, inference optimization.
Source attribution: curated from arXiv cs.AI (@Junxia Cui, Haotian Ye, Runchu Tian, Hongcan Guo, Jinya Jiang, Haoru Li, Chaojie Ren, Yiming Huang, Kaijie Zhu, Zhongkai Yu, Kun Zhou, Jingbo Shang).