Flash-dLLM:面向快速、内存高效扩散LLM的IO感知KV缓存与并行解码
研究论文 · 2026/09/23
扩散大语言模型(dLLM)通过非自回归文本生成成为自回归LLM的有前景替代方案,但其实际部署受限于低效推理,主要原因是缺乏有效的KV缓存和可扩展的并行解码机制。现有加速方法通常孤立地研究KV缓存和并行解码,忽视了缓存复用与并行令牌验证联合应用时出现的I/O瓶颈。本文提出Flash-dLLM,一种无需训练的推理加速框架,用于快速且内存高效的dLLM。Flash-dLLM首先识别出GPU内存I/O是启用KV缓存的dLLM推理中的主要瓶颈,并通过I/O感知的融合KV缓存内核减少冗余内存移动来解决。基于此优化缓存机制,Flash-dLLM进一步提出了一种高效的KV缓存驱动的草稿-验证解码策略,其中dLLM自身同时充当草稿器和验证器,无需辅助模型。这种统一设计在保持生成质量的同时实现更快解码,并提升了对更长序列和更大批大小的可扩展性。在数学推理和代码生成基准上的大量实验表明,Flash-dLLM在推理速度和内存效率上均持续优于现有最先进的dLLM加速方法。特别是在GSM8K和HumanEval上,它分别比先前最强基线Elastic-Cache实现了5.1倍和11.0倍的加速。
该工作针对扩散大语言模型推理中的关键瓶颈,提出了无需训练的加速框架,在保持生成质量的同时显著提升速度和内存效率,对实际部署有重要价值。
Diffusion Large Language Models (dLLMs) have recently emerged as a promising alternative to autoregressive LLMs by enabling non-autoregressive text generation. However, their practical deployment remains limited by inefficient inference, largely due to the absence of effective Key-Value (KV) caching and scalable parallel decoding mechanisms. Existing acceleration methods typically study KV caching and parallel decoding in isolation, overlooking the I/O bottlenecks that arise when cache reuse and parallel token verification are jointly applied. In this work, we introduce Flash-dLLM, a training-free inference acceleration framework for fast and memory-efficient dLLMs. Flash-dLLM first identifies GPU memory I/O as a dominant bottleneck in KV-cache-enabled dLLM inference and addresses it with an I/O-aware fused KV-cache kernel that reduces redundant memory movement. Building on this optimized cache mechanism, Flash-dLLM further proposes an efficient KV-cache-driven draft-and-verify decoding strategy, where the dLLM itself serves as both drafter and verifier without requiring an auxiliary model. This unified design enables faster decoding while preserving generation quality and improving scalability to longer sequences and larger batch size. Extensive experiments on mathematical reasoning and code-generation benchmarks demonstrate that Flash-dLLM consistently outperforms existing state-of-the-art dLLM acceleration methods in both inference speed and memory efficiency. In particular, it achieves 5.1times and 11.0times speedups over prior strongest baseline Elastic-Cache on GSM8K and HumanEval, respectively.