arXiv:2611.02583cs.AINov 2026

Manuscript Offprint

arXiv:2611.02583

BasisKV: Value Latents for Communication and Key Routing

Lixun Zhang, Zishan Shao, Kangning Cui, Yu Liang, Fan Yang, Yiran Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Long-context large language model (LLM) inference is increasingly constrained by the cost of maintaining an ever-growing KV-cache. Low-rank K/V projections provide a promising way to compress the KV-cache with minimal quality loss, but prior work has largely optimized KV-cache compression in isolation, leaving distributed inference, especially with tensor parallelism where attention computation is partitioned across multiple GPUs, largely underexplored. We make two observations: (i) tensor-parallel communication is an important cost when deploying low-rank KV-cache compression in distributed inference; and (ii) Value compression can be associated with the output projection, allowing the same low-rank Value representation to reduce both Value-cache width and tensor-parallel communication. Based on these observations, we propose BasisKV, a low-rank KV-cache compression method for communication-intensive, long-context LLM inference. BasisKV jointly optimizes the low-rank factors across per-GPU attention partitions against the complete attention output, rather than fitting each partition in isolation. The compressed Value cache is further reused to help identify which Key pages should be accessed: it predicts part of the Key information needed for routing, while a Key-specific residual stores what cannot be recovered from Value. The original Keys are then retrieved only for the selected pages to compute exact QK scores. Across multiple LLM families and system settings, BasisKV achieves a better quality–efficiency tradeoff than existing low-rank baselines, reaching up to 1.42× end-to-end speedup under 8-GPU tensor-parallel inference. The code is available at https://github.com/alexz949/BasisKV

1. Introduction

Long-context large language model (LLM) inference is increasingly constrained by the cost of maintaining an ever-growing KV cache (Chang et al., 2025; Liu et al., 2024). A promising approach is to factorize or transform the Key and Value projection matrices such that inference directly produces and caches low-dimensional K/V representations (Chang et al., 2025; Saxena et al., 2024). This broader family of low-rank KV-cache methods has attracted growing interest, including trainable feature-space projections (Lin et al., 2025) and cross-layer low-rank cache representations (Chang et al., 2026). However, prior low-rank KV-cache methods largely optimize cache efficiency in isolation from tensor-parallel communication. Under tensor parallelism (TP), attention computation is partitioned across multiple GPUs, and the resulting partial attention outputs must additionally be communicated across accelerators (Hansen-Palmus et al., 2024; Shoeybi et al., 2019). This raises a natural question: can low-rank KV-cache compression provide additional benefits under distributed inference beyond reducing the cache itself? Our key observation is that low-rank Value compression can also reduce the width of the attention outputs communicated across GPUs, allowing the same latent representation to reduce both KV-cache size and tensor-parallel traffic. This motivates BasisKV, a low-rank KV-cache compression method designed for distributed long-context inference.

†Corresponding Email: zishan.shao@duke.edu

Figure

Figure 1: Overview of BasisKV. BasisKV compresses each TP-local attention output into a low-rank Value latent, communicates the source-specific latents with AllGather, and reconstructs the complete output after communication. The same Value latent is retained in the cache and reused for Key routing where a Key-specific residual provides the remaining routing information.

BasisKV first moves tensor-parallel communication into a low-rank space by projecting each per-GPU attention output (source) to a lower dimension before communication, preserving these source-specific latents through a source-preserving AllGather, and reconstructing them afterward. Rather than fitting each source independently, BasisKV jointly optimizes all low-rank factors against the complete attention output, accounting for the cross-source interactions that contribute to the reconstruction error.

For attention blocks where the Value path remains linear, the low-rank compression projection applied before communication (the encoder) can be moved to the Value side and folded into the Value projection. This allows the model to directly produce and cache the same compressed Values used for TP communication, with no additional approximation beyond the offline derived low-rank model. We further reuse the compressed Value cache for Key routing. Compressed Values provide part of the information needed to select Key pages, while a Key-specific residual captures the remaining routing information. Original Keys are retrieved only for selected pages to recompute exact QK scores.

Across multiple LLM families, model scales, and inference settings, BasisKV consistently preserves stronger downstream quality than matched low-rank baselines while simultaneously reducing tensor-parallel communication. On eight NVIDIA L40S GPUs, BasisKV reaches up to 1.42× end-to-end speedup under tensor-parallel inference. For long-context decoding, the Value-assisted Key routing avoids accessing full Keys over most of the context; at 128K context on a single L40S GPU, BasisKV achieves 1.63× attention-block speedup and 1.25× full-model decode speedup.

Our contributions are threefold. First, to our knowledge, BasisKV is the first post-training method to jointly reduce persistent Value-cache width and tensor-parallel attention-output communication using the same low-rank Value representation for standard attention. Second, we connect low-rank Value compression with tensor-parallel communication and jointly optimize the resulting low-rank factors against the complete attention output. Third, we further reuse the compressed Value cache for sparse Key routing and demonstrate improved quality-efficiency tradeoffs and end-to-end speedups across multiple models and inference settings.

References (25)