Paper Reading AI Learner

PackKV: Reducing KV Cache Memory Footprint through LLM-Aware Lossy Compression

2025-12-30 20:05:32
Bo Jiang, Taolue Yang, Youyuan Liu, Xubin He, Sheng Di, Sian Jin

Abstract

Transformer-based large language models (LLMs) have demonstrated remarkable potential across a wide range of practical applications. However, long-context inference remains a significant challenge due to the substantial memory requirements of the key-value (KV) cache, which can scale to several gigabytes as sequence length and batch size increase. In this paper, we present \textbf{PackKV}, a generic and efficient KV cache management framework optimized for long-context generation. %, which synergistically supports both latency-critical and throughput-critical inference scenarios. PackKV introduces novel lossy compression techniques specifically tailored to the characteristics of KV cache data, featuring a careful co-design of compression algorithms and system architecture. Our approach is compatible with the dynamically growing nature of the KV cache while preserving high computational efficiency. Experimental results show that, under the same and minimum accuracy drop as state-of-the-art quantization methods, PackKV achieves, on average, \textbf{153.2}\% higher memory reduction rate for the K cache and \textbf{179.6}\% for the V cache. Furthermore, PackKV delivers extremely high execution throughput, effectively eliminating decompression overhead and accelerating the matrix-vector multiplication operation. Specifically, PackKV achieves an average throughput improvement of \textbf{75.7}\% for K and \textbf{171.7}\% for V across A100 and RTX Pro 6000 GPUs, compared to cuBLAS matrix-vector multiplication kernels, while demanding less GPU memory bandwidth. Code available on this https URL

Abstract (translated)

翻译: 基于Transformer的大型语言模型(LLMs)已经在广泛的实用应用中展示了非凡的潜力。然而,长上下文推理仍然是一个重大挑战,因为关键值(KV)缓存的记忆需求随着序列长度和批量大小的增长而显著增加,可能达到数GB之多。在本文中,我们提出了\textbf{PackKV},这是一个专为长上下文生成优化的通用且高效的KV缓存管理框架。%该方法同时支持延迟敏感型和吞吐量敏感型推理场景。 PackKV引入了专门针对KV缓存数据特性的新颖有损压缩技术,并巧妙地将压缩算法与系统架构相结合设计。我们的方法可以与动态增长性质的KV缓存兼容,同时保持高效的计算效率。实验结果表明,在相同的或最小化的精度下降情况下,与最先进的量化方法相比,PackKV在K缓存中平均实现了\textbf{153.2%}更高的内存减少率,在V缓存中则为\textbf{179.6%}。 此外,PackKV能够实现极高的执行吞吐量,有效消除解压缩开销并加速矩阵向量乘法操作。具体来说,与cuBLAS矩阵向量乘核相比,PackKV在A100和RTX Pro 6000 GPU上分别实现了K平均\textbf{75.7%}和V平均\textbf{171.7%}的吞吐量改进,并且所需的GPU内存带宽更少。 代码可在以下网址获取:[请在此处插入实际链接]

URL

https://arxiv.org/abs/2512.24449

PDF

https://arxiv.org/pdf/2512.24449.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot