RAP: KV-Cache Compression via RoPE-Aligned Pruning

Read full text
Authors: Jihao Xin, Tian Lyu, David Elliot Keyes, Hatem Ltaief, Marco Canini
Cited by: 0

Abstract

Long-context inference in large language models (LLMs) is bottlenecked by the memory and compute of the key-value (KV) cache. Structured pruning is a direct way to shrink it: dropping the least useful channels of the W_k, W_v projection weights to reduce the output KV dimensions. However, modern LLMs apply Rotary Position Embedding (RoPE) after the QK projections, which rotates feature dimensions in pairs. Therefore, removing individual channels breaks these pairs, corrupting RoPE's positional semantics and rendering the pruned model unusable. We propose RoPE-Aligned Pruning (RAP), which constrains the pruning granularity to RoPE-aligned pairs rather than individual channels: removing whole pairs to keep the rotation intact. Our evaluation across Llama, Mistral, and Qwen models from 3B to 14B shows that RAP preserves accuracy at 30% KV compression (retain ratio \r{ho} = 0.7), far outperforms RoPE-blind channel pruning, stays near the strongest low-rank method at lower attention cost, and composes with orthogonal methods such as quantization.

Fields of Study & Subjects

Advanced Neural Network Applications Topic Modeling Natural Language Processing Techniques

Publication details

Journal / source
arXiv (Cornell University)
Publication date
1 February 2026
Document type
Preprint