Autoregressive (AR) generation is the standard decoding paradigm for Large Language Models (LLMs), but its token-by-token nature limits parallelism at inference time. Diffusion Language Models (DLLMs) offer parallel decoding by recovering multiple masked tokens per step; however, in practice they often fail to translate this parallelism into deployment speed gains over optimized AR engines (e.g., vLLM). A key reason is that many DLLMs rely on bidirectional attention, which breaks standard prefix KV caching and forces repeated contextualization, undermining efficiency. We propose WeDLM, a diffusion decoding framework built entirely on standard causal attention to make parallel generation prefix-cache friendly. The core idea is to let each masked position condition on all currently observed tokens while keeping a strict causal mask, achieved by Topological Reordering that moves observed tokens to the physical prefix while preserving their logical positions. Building on this property, we introduce a streaming decoding procedure that continuously commits confident tokens into a growing left-to-right prefix and maintains a fixed parallel workload, avoiding the stop-and-wait behavior common in block diffusion methods. Experiments show that WeDLM preserves the quality of strong AR backbones while delivering substantial speedups, approaching 3x on challenging reasoning benchmarks and up to 10x in low-entropy generation regimes; critically, our comparisons are against AR baselines served by vLLM under matched deployment settings, demonstrating that diffusion-style decoding can outperform an optimized AR engine in practice.


翻译:自回归生成是大型语言模型的标准解码范式,但其逐词生成特性限制了推理时的并行性。扩散语言模型通过每步恢复多个掩码词元实现并行解码;然而在实践中,它们往往无法将这种并行性转化为相对于优化自回归引擎(如vLLM)的部署速度优势。关键原因在于许多扩散语言模型依赖双向注意力机制,这破坏了标准前缀键值缓存机制,迫使模型重复进行上下文计算,从而损害了效率。我们提出WeDLM——一个完全基于标准因果注意力机制构建的扩散解码框架,旨在实现与前缀缓存兼容的并行生成。其核心思想是让每个掩码位置以所有当前观测词元为条件,同时保持严格的因果掩码,这是通过拓扑重排序实现的:该方法将观测词元移至物理前缀位置,同时保留其逻辑位置。基于此特性,我们引入流式解码流程,持续将高置信度词元提交至不断增长的从左到右前缀中,并维持固定的并行工作量,避免了块扩散方法中常见的"停止-等待"行为。实验表明,WeDLM在保持强大自回归骨干网络质量的同时,实现了显著的加速效果:在具有挑战性的推理基准测试中接近3倍加速,在低熵生成场景中最高可达10倍加速;关键的是,我们的对比实验是在匹配部署设置下与vLLM服务的自回归基线进行的,这证明了扩散式解码在实践中能够超越优化后的自回归引擎。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
【ICCV2023】保留模态结构改进多模态学习
专知会员服务
31+阅读 · 2023年8月28日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员