Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMs

Ravi Ghadia, Avinash Kumar, Gaurav Jain, Prashant Nair, Poulami Das
3/2/2025
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Autoregressive Transformers rely on Key-Value (KV) caching to accelerate inference. However, the linear growth of the KV cache with context length leads to excessive memory consumption and bandwidth constraints. This bottleneck is particularly problematic in real-time applications -- such as chatbots and interactive assistants -- where low latency and high memory efficiency are critical. Existing methods drop distant tokens or compress states in a lossy manner, sacrificing accuracy by discarding vital context or introducing bias. We propose MorphKV, an inference-time technique that maintains a constant-sized KV cache while preserving accuracy. MorphKV balances long-range dependencies and local coherence during text generation. It eliminates early-token bias while retaining high-fidelity context by adaptively ranking tokens through correlation-aware selection. Unlike heuristic retention or lossy compression, MorphKV iteratively refines the KV cache via lightweight updates guided by attention patterns of recent tokens. This approach captures inter-token correlation with greater accuracy, crucial for tasks like content creation and code generation. Our studies on long-response tasks show 52.9$\%$ memory savings and 18.2$\%$ higher accuracy on average compared to state-of-the-art prior works, enabling efficient real-world deployment.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ghadia2025dialogue,
  title  = {Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMs},
  author = {Ravi Ghadia and Avinash Kumar and Gaurav Jain and Prashant Nair and Poulami Das},
  year   = {2025},
  eprint = {2503.00979},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.00979v2},
  journal = {ICML 2025 2025}
}

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/2503.00979.svg)](https://codeofpaper.com/paper/2503.00979)

Discussion