paper-with-me

Papers

dKV-Cache: The Cache for Diffusion Language Models

2025-05-21 · Xinyin Ma, Runpeng Yu, Gongfan Fang, Xinchao Wang

Diffusion Language Models (DLMs) have been seen as a promising competitor for autoregressive language models. However, diffusion language models have long been constrained by slow inference. A core challenge is that their non-autoregressive architecture and bidirectional attention preclude the key-value cache that accelerates decoding. We address this bottleneck by proposing a KV-cache-like mechanism, delayed KV-Cache, for the denoising process of DLMs. Our approach is motivated by the observation that different tokens have distinct representation dynamics throughout the diffusion process. Accordingly, we propose a delayed and conditioned caching strategy for key and value states. We design two complementary variants to cache key and value step-by-step: (1) dKV-Cache-Decode, which provides almost lossless acceleration, and even improves performance on long sequences, suggesting that existing DLMs may under-utilise contextual information during inference. (2) dKV-Cache-Greedy, which has aggressive caching with reduced lifespan, achieving higher speed-ups with quadratic time complexity at the cost of some performance degradation. dKV-Cache, in final, achieves from 2-10x speedup in inference, largely narrowing the gap between ARs and DLMs. We evaluate our dKV-Cache on several benchmarks, delivering acceleration across general language understanding, mathematical, and code-generation benchmarks. Experiments demonstrate that cache can also be used in DLMs, even in a training-free manner from current DLMs.

📄 PDF Abstract BibTeX arXiv:2505.15781

Code (2)

horseee/dkv-cache 공식 구현 pytorch
alibaba/graph-gpt pytorch

Tasks

Code GenerationDenoising

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
Diffusion Diffusion models generate samples by gradually removing noise from a signal, and their training objective can be expressed as a reweighted variational lower-bound…

Similar Papers 제목 키워드 기반

LaCache: Exact Caching and Precision-Adaptive Inference for Diffusion Large Language Models

2026-07-16 · Xingru Chen, Zelang Liang, Yongjia Ma, Jiqing Zhan 외 arxiv

Diffusion-based Large Language Models(DLLMs) enable parallel generation via Semi-Autoregressive (SAR) decoding in text generation. However, current methods suffer from severe operator-level redundancy: they recompute the…

Text Generation

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

2025-09-27 · Yuchu Jiang, Yue Cai, Xiangzhong Luo, Jiale Fu 외 arxiv

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 …

FlexCache: Flexible Approximate Cache System for Video Diffusion

2024-12-18 · Desen Sun, Henry Tian, Tim Lu, Sihang Liu

Text-to-Video applications receive increasing attention from the public. Among these, diffusion models have emerged as the most prominent approach, offering impressive quality in visual content generation. However, it st…

Video Generation

DiCache: Let Diffusion Model Determine Its Own Cache

2025-08-24 · Jiazi Bu, Pengyang Ling, Yujie Zhou, Yibin Wang 외 arxiv

Recent years have witnessed the rapid development of acceleration techniques for diffusion models, especially caching-based acceleration methods. These studies seek to answer two fundamental questions: "When to cache" an…

Attention Is All You Need for KV Cache in Diffusion LLMs

2025-10-16 · Quan Nguyen-Tri, Mukul Ranjan, Zhiqiang Shen arxiv

This work studies how to adaptively recompute key-value (KV) caches for diffusion large language models (DLMs) to maximize prediction accuracy while minimizing decoding latency. Prior methods' decoders recompute QKV for …

Mathematical ReasoningCode Generation