KV-Latent: Dimensional-level KV Cache Reduction with Frequency-aware Rotary Positional Embedding

Luohe Shi, Zuchao Li, Lefei Zhang, Guoming Liu, Baoyuan Qi +1 more
7/15/2025
cs.CL

Official code: ShiLuohe/KV-Latent (3 stars, last commit 2025-05-26).

Abstract

Large language models (LLMs) based on Transformer Decoders have become the preferred choice for conversational generative AI. Despite the overall superiority of the Decoder architecture, the gradually increasing Key-Value (KV) cache during inference has emerged as a primary efficiency bottleneck, both in aspects of memory consumption and data transfer bandwidth limitations. To address these challenges, we propose a paradigm called KV-Latent. By down-sampling the Key-Value vector dimensions into a latent space, we can significantly reduce the KV Cache footprint and improve inference speed, only with a small amount of extra training, less than 1\% of pre-training takes. Besides, we enhanced the stability of Rotary Positional Embedding applied on lower-dimensional vectors by modifying its frequency sampling mechanism, avoiding noise introduced by higher frequencies while retaining position attenuation. Our experiments, including both models with Grouped Query Attention and those without, have yielded satisfactory results. Finally, we conducted comparative experiments to study the impact of separately reducing Key and Value components on model's performance. Our approach allows for the construction of more efficient language model systems, and opens the new possibility on KV Cache saving and efficient LLMs. Our code is available at https://github.com/ShiLuohe/KV-Latent.

View on arXivView PDF

Code Implementations(1)

ShiLuohe/KV-LatentOfficial100%

Official repositiory of paper KV-Latent

30PythonMay 26, 20251 years ago

Similar Papers

Cite this paper

@article{shi2025kvlatent,
  title  = {KV-Latent: Dimensional-level KV Cache Reduction with Frequency-aware Rotary Positional Embedding},
  author = {Luohe Shi and Zuchao Li and Lefei Zhang and Guoming Liu and Baoyuan Qi and Hai Zhao},
  year   = {2025},
  eprint = {2507.11273},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.11273v1}
}

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

Discussion