RAP: KV-Cache Compression via RoPE-Aligned Pruning

Jihao Xin, Tian Lyu, David Keyes, Hatem Ltaief, Marco Canini
2/1/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Long-context inference in large language models is increasingly bottlenecked by the memory and compute cost of the KV-Cache. Low-rank factorization compresses KV projections by writing $W \approx A * B$, where A produces latent KV states and B can be absorbed into downstream weights. In modern RoPE-based LLMs, this absorption fails: RoPE forces latent KV states to be reconstructed to full dimension, reintroducing substantial memory and compute overhead. We propose RoPE-Aligned Pruning (RAP), which prunes entire RoPE-aligned column pairs to preserve RoPE's 2x2 rotation structure, restore B absorption, and eliminate reconstruction. Our evaluation on LLaMA-3-8B and Mistral-7B shows that RAP enables joint reduction of KV-Cache, attention parameters, and FLOPs by 20-30%, all at once, while maintaining strong accuracy. Notably, RAP reduces attention latency to 83% (prefill) and 77% (decode) of baseline.

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. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

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

Cite this paper

@article{xin2026rap,
  title  = {RAP: KV-Cache Compression via RoPE-Aligned Pruning},
  author = {Jihao Xin and Tian Lyu and David Keyes and Hatem Ltaief and Marco Canini},
  year   = {2026},
  eprint = {2602.02599},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.02599v3}
}

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

Discussion