Free Draft-and-Verification: Toward Lossless Parallel Decoding for Diffusion Large Language Models
作者: Shutong Wu, Jiawei Zhang
分类: cs.LG, cs.AI
发布日期: 2025-09-30 (更新: 2026-02-03)
💡 一句话要点
提出FreeDave算法,实现扩散大语言模型无损并行解码加速。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 扩散模型 大语言模型 并行解码 推理加速 无损解码
📋 核心要点
- 现有DLLM并行解码算法在加速推理的同时,会牺牲生成质量,导致性能下降。
- FreeDave算法通过并行生成候选token并进行验证,保证解码过程与one-token-per-step解码一致。
- 实验证明,FreeDave在不损失性能的前提下,能显著加速DLLM的推理过程,最高可达2.83倍。
📝 摘要(中文)
扩散大语言模型(DLLMs)已经成为一种超越自回归next-token预测的新型语言建模范式。DLLMs利用其固有的建模基础,在并行解码算法方面具有高效推理的巨大潜力,从而实现多token预测。然而,高质量的生成通常需要解码步数等于序列长度,这相当于执行one-token-per-step解码。现有的并行解码算法虽然能加速推理,但以次优解码路径为代价,导致性能显著下降。为了克服这一挑战,我们提出了一种新颖的快速解码算法Free Draft-and-Verification (FreeDave),该算法专为DLLMs设计,无需任何模型修改或额外模块即可实现无损并行解码。具体来说,我们提出了一种并行解码候选生成和验证算法,该算法在理论上保证使用最少的模型前向调用来重现one-token-per-step解码生成的相同序列。通过对不同DLLMs在数学推理和代码生成基准上的广泛评估,FreeDave被证明可以在不降低性能的情况下将推理速度提高高达2.83倍。
🔬 方法详解
问题定义:论文旨在解决扩散大语言模型(DLLMs)并行解码时,速度提升与生成质量之间的矛盾。现有的并行解码算法为了加速推理,通常会采用次优的解码路径,导致生成质量下降,无法达到与one-token-per-step解码相同的性能水平。
核心思路:FreeDave的核心思路是采用一种draft-and-verification的策略,并行地生成多个候选token(draft),然后通过验证机制来确保最终选择的token序列与one-token-per-step解码的结果一致。这样既能利用并行解码的优势,又能避免生成质量的损失。
技术框架:FreeDave算法主要包含两个阶段:draft阶段和verification阶段。在draft阶段,算法并行地生成多个候选token。在verification阶段,算法对这些候选token进行验证,选择与one-token-per-step解码结果最接近的token。整个过程无需修改原始DLLM模型或引入额外的模块。
关键创新:FreeDave的关键创新在于提出了一种高效的并行解码候选生成和验证算法,该算法在理论上保证使用最少的模型前向调用来重现one-token-per-step解码生成的相同序列。这种方法避免了传统并行解码算法中因次优解码路径导致的性能下降问题。
关键设计:FreeDave算法的关键设计在于如何有效地生成候选token以及如何进行验证。具体的候选token生成方法取决于所使用的DLLM模型。验证过程可以通过比较候选token与one-token-per-step解码结果之间的差异来实现,例如使用KL散度或交叉熵等指标。
🖼️ 关键图片
📊 实验亮点
实验结果表明,FreeDave算法在数学推理和代码生成等任务上,能够在不损失性能的前提下,将DLLM的推理速度提高高达2.83倍。这一显著的加速效果证明了FreeDave算法在DLLM并行解码方面的有效性,优于现有的并行解码方法。
🎯 应用场景
FreeDave算法可广泛应用于需要快速推理的扩散大语言模型应用场景,例如实时对话系统、快速文本生成、代码生成等。该算法的无损加速特性使其在对生成质量要求较高的场景中具有重要价值,有助于提升用户体验和系统效率。未来,该算法可以进一步推广到其他类型的生成模型中。
📄 摘要(原文)
Diffusion Large Language Models (DLLMs) have emerged as a new paradigm of language modeling beyond autoregressive next-token prediction. Taking advantage of their inherent modeling foundations, DLLMs have the great potential of efficient inference with parallel decoding algorithms, which enable multi-token prediction. However, the high generation quality often requires the number of decoding steps equal to the sequence length, which performs a one-token-per-step decoding, and existing parallel decoding algorithms, which yield suboptimal decoding paths, bring inference speedup at the cost of non-negligible performance degradation. To overcome this challenge, we introduce Free Draft-and-Verification (FreeDave), a novel fast decoding algorithm tailored for DLLMs that achieves lossless parallel decoding without any model modification or extra modules. Specifically, we propose an algorithm of parallel-decoded candidate generation and verification, which is theoretically guaranteed to use the fewest model forward calls to reproduce the same sequence generated by one-token-per-step decoding. By extensive evaluations on math reasoning and code generation benchmarks across different DLLMs, FreeDave is proven to accelerate the inference up to $2.83\times$ without performance degradation.