MarkTechPost@AI 06月02日 13:10
NVIDIA AI Introduces Fast-dLLM: A Training-Free Framework That Brings KV Caching and Parallel Decoding to Diffusion LLMs
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

NVIDIA、香港大学和麻省理工学院的研究人员提出了Fast-dLLM,一种无需重新训练的框架,旨在解决扩散语言模型(LLM)的局限性。Fast-dLLM引入了块状近似KV缓存机制和置信度感知并行解码策略,有效提升了推理速度和生成质量。该框架通过分割序列为块,计算并存储KV激活,实现了高效的缓存复用。同时,系统评估每个token的置信度,仅解码超过阈值的token,从而避免了依赖性违规。实验结果表明,Fast-dLLM在多个基准测试中取得了显著的性能提升,同时保持了较高的准确率。

💽Fast-dLLM引入块状近似KV缓存机制,通过将序列分割成块,预先计算并存储KV激活,从而在后续解码步骤中实现高效的缓存复用。DualCache版本进一步扩展了该方法,通过缓存前缀和后缀token,利用相邻推理步骤之间的高相似性。

💡Fast-dLLM采用置信度感知并行解码策略,评估每个token的置信度,并仅解码那些超过设定阈值的token。这一策略有效防止了同步采样带来的依赖性违规,确保了在多token并行解码时生成更高质量的文本。

⏱️Fast-dLLM在GSM8K数据集上实现了高达27.6倍的加速,在MATH基准测试中实现了6.5倍的加速,在HumanEval基准测试中实现了高达3.2倍的加速。同时,在所有任务和模型中,准确率保持在基线模型的1-2个百分点内。

Diffusion-based large language models (LLMs) are being explored as a promising alternative to traditional autoregressive models, offering the potential for simultaneous multi-token generation. By using bidirectional attention mechanisms, these models aim to accelerate decoding, theoretically providing faster inference than autoregressive systems. However, despite their promise, diffusion models often struggle in practice to deliver competitive inference speeds, thereby limiting their ability to match the real-world performance of autoregressive large language models LLMs.

The primary challenge lies in the inefficiency of inference in diffusion-based LLMs. These models typically do not support key-value (KV) cache mechanisms, which are essential for accelerating inference by reusing previously computed attention states. Without KV caching, every new generation step in diffusion models repeats full attention computations, making them computationally intensive. Further, when decoding multiple tokens simultaneously—a key feature of diffusion models—the generation quality often deteriorates due to disruptions in token dependencies under the conditional independence assumption. This makes diffusion models unreliable for practical deployment despite their theoretical strengths.

Attempts to improve diffusion LLMs have focused on strategies like block-wise generation and partial caching. For instance, models such as LLaDA and Dream incorporate masked diffusion techniques to facilitate multi-token generation. However, they still lack an effective key-value (KV) cache system, and parallel decoding in these models often results in incoherent outputs. While some approaches use auxiliary models to approximate token dependencies, these methods introduce additional complexity without fully addressing the underlying performance issues. As a result, the speed and quality of generation in diffusion LLMs continue to lag behind autoregressive models.

Researchers from NVIDIA, The University of Hong Kong, and MIT introduced Fast-dLLM, a framework developed to address these limitations without requiring retraining. Fast-dLLM brings two innovations to diffusion LLMs: a block-wise approximate KV Cache mechanism and a confidence-aware parallel decoding strategy. The approximate KV Cache is tailored for the bidirectional nature of diffusion models, allowing activations from previous decoding steps to be reused efficiently. The confidence-aware parallel decoding selectively decodes tokens based on a confidence threshold, reducing errors that arise from the assumption of token independence. This approach offers a balance between speed and generation quality, making it a practical solution for diffusion-based text generation tasks.

In-depth, Fast-dLLM’s KV Cache method is implemented by dividing sequences into blocks. Before generating a block, KV activations for other blocks are computed and stored, enabling reuse during subsequent decoding steps. After generating a block, the cache is updated across all tokens, which minimizes computation redundancy while maintaining accuracy. The DualCache version extends this approach by caching both prefix and suffix tokens, taking advantage of high similarity between adjacent inference steps, as demonstrated by cosine similarity heatmaps in the paper. For the parallel decoding component, the system evaluates the confidence of each token and decodes only those exceeding a set threshold. This prevents dependency violations from simultaneous sampling and ensures higher-quality generation even when multiple tokens are decoded in a single step.

Fast-dLLM achieved significant performance improvements in benchmark tests. On the GSM8K dataset, for instance, it achieved a 27.6× speedup over baseline models in 8-shot configurations at a generation length of 1024 tokens, with an accuracy of 76.0%. On the MATH benchmark, a 6.5× speedup was achieved with an accuracy of around 39.3%. The HumanEval benchmark saw up to a 3.2× acceleration with accuracy maintained at 54.3%, while on MBPP, the system achieved a 7.8× speedup at a generation length of 512 tokens. Across all tasks and models, accuracy remained within 1–2 points of the baseline, showing that Fast-dLLM’s acceleration does not significantly degrade output quality.

The research team effectively addressed the core bottlenecks in diffusion-based LLMs by introducing a novel caching strategy and a confidence-driven decoding mechanism. By addressing inference inefficiency and enhancing decoding quality, Fast-dLLM demonstrates how diffusion LLMs can approach or even surpass autoregressive models in speed while maintaining high accuracy, making them viable for deployment in real-world language generation applications.


Check out the Paper and Project Page . All credit for this research goes to the researchers of this project. Also, feel free to follow us on Twitter and don’t forget to join our 95k+ ML SubReddit and Subscribe to our Newsletter.

The post NVIDIA AI Introduces Fast-dLLM: A Training-Free Framework That Brings KV Caching and Parallel Decoding to Diffusion LLMs appeared first on MarkTechPost.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Fast-dLLM 扩散语言模型 KV缓存 并行解码
相关文章