CLMay 26, 2025

TailorKV: A Hybrid Framework for Long-Context Inference via Tailored KV Cache Optimization

arXiv:2505.19586v27 citationsh-index: 20ACL
Originality Incremental advance
AI Analysis

This addresses efficiency problems for deploying large language models in resource-constrained environments, though it is incremental as it builds on existing compression and offloading techniques.

The paper tackles the memory overhead and latency issues in KV cache for long-context LLM inference by proposing TailorKV, a hybrid compression method combining quantization and offloading, which achieves nearly lossless performance and enables serving Llama-3.1-8B with 128k context on a single RTX 3090 GPU at 82 ms per token.

The Key-Value (KV) cache in generative large language models (LLMs) introduces substantial memory overhead. Existing works mitigate this burden by offloading or compressing the KV cache. However, loading the entire cache incurs significant latency due to PCIe bandwidth bottlenecks in CPU-GPU communication, while aggressive compression causes notable performance degradation. We identify that certain layers in the LLM need to maintain global information and are unsuitable for selective loading. In contrast, other layers primarily focus on a few tokens with dominant activations that potentially incur substantial quantization error. This observation leads to a key insight that loading dominant tokens and quantizing all tokens can complement each other. Building on this insight, we propose a hybrid compression method, TailorKV, which seamlessly integrates quantization and offloading. TailorKV develops an inference framework along with a hardware-friendly implementation that leverages these complementary characteristics. Extensive long-context evaluations exhibit that TailorKV achieves nearly lossless performance under aggressive compression settings, outperforming the state-of-the-art. Particularly, the Llama-3.1-8B with 128k context can be served within a single RTX 3090 GPU, reaching 82 ms per token during decoding.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes