NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sparse-dLLM: Accelerating Diffusion LLMs with Dynamic Cache Eviction

Yuerong Song, Xiaoran Liu, Ruixiao Li, Zhigeng Liu, Zengfeng Huang, Qipeng Guo, Ziwei He, Xipeng QiuarXiv 2025 · DOI

Abstract

Diffusion Large Language Models (dLLMs) offer promising parallel decoding capabilities but are hindered by $O(L^2)$ computational complexity and excessive memory demands during long-context inference. We introduce Sparse-dLLM, a training-free, plug-and-play framework that leverages natural attention sparsity to optimize the KV cache. By employing dynamic bidirectional cache eviction and delayed updates, Sparse-dLLM identifies and retains only "pivotal" tokens. Our evaluation demonstrates that Sparse-dLLM can boost throughput by up to 10x while maintaining competitive accuracy and avoiding the memory bloat common in existing caching strategies.

Introduction

Traditional auto-regressive (AR) LLMs generate text sequentially, utilizing a Key-Value (KV) cache to store previous states. In contrast, Diffusion LLMs (dLLMs) iteratively refine an entire sequence of masked tokens in parallel. While this approach is theoretically faster for decoding, the need to update the entire sequence at every step leads to significant computational overhead. Previous attempts to adapt KV caching for dLLMs often resulted in memory exhaustion (OOM) for long sequences because they cached all tokens across all layers. Sparse-dLLM addresses this by aggressively pruning the KV cache without requiring additional training.

Methodology

Sparse-dLLM introduces two primary innovations to manage the KV cache efficiently:

  1. Dynamic Bidirectional Cache Eviction: Unlike AR models that only process preceding tokens, dLLMs have a bidirectional view. Sparse-dLLM calculates attention scores between the current decoding block and the entire sequence (both prefix and suffix). By applying max pooling to these scores, the model identifies the top-$k$ most important KV states based on a target retention ratio. Unimportant tokens are evicted, significantly reducing the cache size.
  2. Delayed Cache Updates: The authors observed that KV states are highly unstable during the initial step of decoding a new block. To prevent caching noisy representations, Sparse-dLLM delays the cache update by one step, ensuring that only stabilized states are stored for future iterations.

Key Insights: Exploiting Attention Sparsity

A core finding of this work is that dLLMs exhibit massive attention sparsity, similar to their AR counterparts. Even with bidirectional access, the model focuses on a small subset of "pivotal" tokens.

Attention heatmaps across different layers and diffusion steps show consistent vertical patterns, indicating that specific tokens (pivotal tokens) receive the majority of attention regardless of the decoding stage.

As shown in the attention heatmaps, these pivotal tokens remain consistent across different diffusion steps (e.g., Step 0 vs. Step 15). This temporal consistency allows Sparse-dLLM to confidently evict low-relevance tokens early in the process without degrading the final output quality. Interestingly, many of these pivotal tokens are structural elements like spaces or line breaks, suggesting they serve as anchors for the model's internal representations.

Experimental Results

The framework was evaluated across several benchmarks, including MMLU, GSM8K, and GPQA, using models like LLaDA-8B and Dream-7B.

Throughput vs. Accuracy on GPQA (5-shot). Sparse-dLLM (purple) achieves significantly higher throughput than vanilla and other caching methods while maintaining or slightly improving accuracy.

Performance and Efficiency

  • Throughput Gains: Sparse-dLLM achieved up to a 10x increase in throughput for 4k sequence lengths. On the GSM8K benchmark with LLaDA-8B, throughput rose from 4.57 to 26.45 tokens per second.
  • Memory Stability: Unlike competing methods like Fast-dLLM, which often trigger OOM errors in long-context scenarios, Sparse-dLLM maintains a memory footprint nearly identical to the vanilla baseline.
  • Accuracy Preservation: The method does not sacrifice reasoning capability. In several instances, accuracy improved, likely due to the removal of irrelevant or noisy context tokens.

Discussion and Limitations

While Sparse-dLLM excels in general reasoning and math tasks, it shows a slight performance dip in coding benchmarks like HumanEval. This suggests that code generation may require a more holistic view of the context, where even seemingly "unimportant" tokens play a critical role. Future research could explore more nuanced eviction strategies that distinguish between semantic and structural tokens to further refine performance in specialized domains.

Summary updated

BibTeX
@misc{song2025sparse,
  author = {Yuerong Song and Xiaoran Liu and Ruixiao Li and Zhigeng Liu and Zengfeng Huang and Qipeng Guo and Ziwei He and Xipeng Qiu},
  title = {{Sparse-dLLM: Accelerating Diffusion LLMs with Dynamic Cache Eviction}},
  year = {2025},
  eprint = {2508.02558},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.02558},
}
Figure