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

Yuchu Jiang, Yue Cai, Xiangzhong Luo, Jiale Fu, Jiarui Wang +2 more
9/27/2025
cs.CL

Official code: Kamichanw/d2Cache (136 stars, Apache-2.0, last commit 2026-03-11).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

Kamichanw/d2CacheOfficial100%
Apache-2.0

[ICLR'26] Official code of paper "d2Cache: Accelerating Diffusion-based LLMs via Dual Adaptive Caching"

1363Shell, PythonSep 24, 20257 months agoApache-2.0

Similar Papers

Cite this paper

@article{jiang2025dcache,
  title  = {d$^2$Cache: Accelerating Diffusion-Based LLMs via Dual Adaptive Caching},
  author = {Yuchu Jiang and Yue Cai and Xiangzhong Luo and Jiale Fu and Jiarui Wang and Chonghan Liu and Xu Yang},
  year   = {2025},
  eprint = {2509.23094},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.23094v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.23094.svg)](https://codeofpaper.com/paper/2509.23094)

Discussion