dParallel:面向 dLLM 的可学习并行解码
dParallel: Learnable Parallel Decoding for dLLMs
AI总结:
本文提出 dParallel 及确定性强制蒸馏,以释放扩散大语言模型的并行解码潜力,在 LLaDA-8B-Instruct 上显著减少 GSM8K 与 MBPP 的解码步数并保持性能。
摘要:
扩散大语言模型(dLLM)作为自回归生成的一种有前景的替代方案,近来受到研究界的广泛关注,其具备并行 token 预测能力和更低的推理延迟。然而,它们的并行解码潜力仍远未得到充分开发,因为现有开源模型仍需接近 token 长度的解码步数来保证性能。为解决这一问题,我们提出 dParallel,这是一种简单而有效的方法,可释放 dLLM 固有的并行性以实现快速采样。我们发现,并行解码的关键瓶颈在于被掩码 token 的顺序式确定性收敛。基于这一洞察,我们提出方法核心:certainty-forcing distillation(确定性强制蒸馏),这是一种新颖的训练策略,蒸馏模型使其遵循原始采样轨迹,同时强制模型更快且并行地对被掩码 token 达到高确定性。跨多个基准的大量实验表明,我们的方法可在保持性能的同时大幅减少解码步数。将 dParallel 应用于 LLaDA-8B-Instruct 模型时,其在 GSM8K 上将解码步数从 256 降至 30,实现 8.5 倍加速且无性能下降。在 MBPP 基准上,它将解码步数从 256 降至 24,带来 10.5 倍加速,同时保持准确率。我们的代码可在 https://github.com/czg1225/dParallel 获取。
英文摘要:
Diffusion large language models (dLLMs) have recently drawn considerable attention within the research community as a promising alternative to autoregressive generation, offering parallel token prediction and lower inference latency. Yet, their parallel decoding potential remains largely underexplored, as existing open-source models still require nearly token-length decoding steps to ensure performance. To address this, we introduce dParallel, a simple and effective method that unlocks the inherent parallelism of dLLMs for fast sampling. We identify that the key bottleneck to parallel decoding arises from the sequential certainty convergence for masked tokens. Building on this insight, we introduce the core of our approach: certainty-forcing distillation, a novel training strategy that distills the model to follow its original sampling trajectories while enforcing it to achieve high certainty on masked tokens more rapidly and in parallel. Extensive experiments across various benchmarks demonstrate that our method can dramatically reduce the number of decoding steps while maintaining performance. When applied to the LLaDA-8B-Instruct model, dParallel reduces decoding steps from 256 to 30 on GSM8K, achieving an 8.5x speedup without performance degradation. On the MBPP benchmark, it cuts decoding steps from 256 to 24, resulting in a 10.5x speedup while maintaining accuracy. Our code is available at https://github.com/czg1225/dParallel
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。