arXiv:2509.23094cs.CL2025-09中稿 · ICLR被引 24

提出d²Cache,让扩散模型推理提速且更准

d$^2$Cache: Accelerating Diffusion-Based LLMs via Dual Adaptive Caching

  • 用双阶段细粒度选择,动态缓存关键键值对
  • 在两个扩散模型上提速超2倍,生成质量不变
  • 适合追求高效扩散语言模型的开发者

基于扩散的大型语言模型(dLLMs)虽性能优异,但推理效率低下,因其依赖双向注意力,无法像自回归模型一样直接使用标准键值缓存。为此,我们提出无需训练的双重自适应缓存框架d²Cache,通过两阶段细粒度选择策略,在每一步解码时识别关键标记并自适应更新其键值状态,同时缓存其余标记的键值以复用。此外,d²Cache自然支持更可靠的解码路径,可实现类从左到右的生成,并缓解序列末端过早自信的问题。在两个代表性dLLM(LLaDA 和 Dream)上的实验表明,d²Cache不仅显著提升推理速度,还保持甚至提升了生成质量。代码已开源:https://github.com/Kamichanw/d2Cache。

原文摘要 · Abstract (English)

Diffusion-based large language models (dLLMs), despite their promising performance, still suffer from inferior inference efficiency. This is because dLLMs rely on bidirectional attention and cannot directly benefit from the standard key-value (KV) cache as autoregressive models (ARMs) do. To tackle this issue, we introduce \textit{Dual aDaptive Cache} (d$^2$Cache), which is a training-free approximate KV cache framework for accelerating dLLM inference. d$^2$Cache features a two-stage fine-grained selection strategy to identify tokens and adaptively update their KV states at each decoding step, while caching the KV states of the remaining tokens for reuse. Furthermore, d$^2$Cache naturally offers a more reliable decoding alternative, which can enable quasi left-to-right generation and mitigate premature overconfidence in tokens at the end of the sequence. Extensive experimental results on two representative dLLMs (\ie, LLaDA and Dream) demonstrate that d$^2$Cache not only achieves substantial inference speedups, but also yields consistent improvements in generation quality. The code is available at https://github.com/Kamichanw/d2Cache.

扩散模型推理加速缓存优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。