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

扩散式 LLM 可以通过离散扩散强制实现快于 AR 的推理

Diffusion LLMs Can Do Faster-Than-AR Inference via Discrete Diffusion Forcing

Shanghai Jiao Tong University(上海交通大学);University of California San Diego(加州大学圣地亚哥分校);Shanghai University(上海大学)

Xu Wang, Chenkai Xu, Yijie Jin, Jiachun Jin, Hao Zhang, Zhijie Deng

AI总结:

本文提出离散扩散强制(D2F)策略,将扩散式大语言模型改造为AR-扩散混合范式,结合块级自回归与并行解码,在保持输出质量的同时实现比自回归模型快2.5倍以上的推理速度。

摘要:

扩散式大语言模型(dLLMs)已成为自回归(AR)LLMs 用于文本生成的一种有前景的替代方案,具有在单次迭代中解码多个 token 的潜力。然而,现有的开源 dLLMs 都没有实现比同等规模的 AR LLMs 更快的推理速度。本文基于一种简单有效的策略——离散扩散强制(D2F)打破了这一障碍。D2F 赋予 dLLMs 两项关键能力:(1) 块级自回归生成以实现 KV 缓存利用;(2) 在不要求完成前序块的情况下预测后续 token,以实现块间并行解码。通过这种方式,原始 dLLMs 被改造成 AR-扩散混合范式以实现高效推理。D2F 可以通过基于预训练 dLLMs 的非对称蒸馏过程来实现。我们进一步提出了一种流水线并行解码算法,该算法能够在效率和有效性之间进行权衡。在实验中,D2F dLLMs 在 GSM8K 上实现了比 LLaMA3 和 Qwen2.5 超过 2.5 倍的推理速度。与 LLaDA 和 Dream 等原始 dLLMs 相比,在保持可比输出质量的同时,加速可达 50 倍以上。代码可在 https://github.com/zhijie-group/Discrete-Diffusion-Forcing 获取。

英文摘要:

Diffusion Large Language Models (dLLMs) have emerged as a promising alternative to autoregressive (AR) LLMs for text generation, with the potential to decode multiple tokens in a single iteration. However, none of the existing open-source dLLMs have achieved superior inference speed over AR LLMs of similar size. This paper breaks this barrier based on a simple and effective strategy named discrete diffusion forcing (D2F). D2F equips dLLMs with two key capabilities: (1) block-wise autoregressive generation to enable KV cache utilization; (2) prediction of following tokens without requiring completion of prior blocks for inter-block parallel decoding. In this way, the vanilla dLLMs are refurbished into an AR-diffusion hybrid paradigm for efficient inference. D2F can be implemented with an asymmetric distillation process based on pre-trained dLLMs. We further propose a pipelined parallel decoding algorithm, which enables a trade-off between efficiency and efficacy. Empirically, D2F dLLMs achieve more than $\mathbf{2.5\times}$ inference speed than LLaMA3 and Qwen2.5 on GSM8K. Compared to vanilla dLLMs like LLaDA and Dream, the acceleration can be more than $\mathbf{50\times}$ while maintaining comparable output quality. The code is available at https://github.com/zhijie-group/Discrete-Diffusion-Forcing.

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

↑