vix.ing · top · new · best · stats · spec

RAP: KV-Cache Compression via RoPE-Aligned Pruning

2026/02/28 by Jihao Xin, Tian Lyu, David Keyes +2
Computer Science · #cs.AI #cs.LG

paper · pdf · doi:10.48550/arxiv.2602.02599

arxiv created 2026/07/30 · arxiv updated 2026/08/04

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 Wk, Wv 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 \rho = 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.

Citations