arXiv · 2408.04107
FDC: Fast KV Dimensionality Compression for Efficient LLM Inference
Abstract
In large-language models, memory constraints in the Key-Value Cache (KVC) pose a challenge during inference. In this work, we propose FDC, a fast KV dimensionality compression system that eliminates the decompression overhead incurred in the existing KV dimensionality compression system, Palu, and reduces attention time. Moreover, FDC employs adaptive compression, tailoring KV compression rates across heads and layers based on their contributions to inference to maximize overall compression while maintaining an accuracy loss constraint. Additionally, FDC enhances the attention kernel to balance the uneven workloads caused by the adaptive compression approach to further reduce attention computation latency. Comprehensive experiments demonstrate that compared to Palu, FDC can reduce Job Completion Time (JCT) by up to 64%, and delivers up to 1.97X throughput under the same latency, while maintaining 99% of the accuracy without compression. When state-of-the-art eviction and quantization methods are combined with FDC, they exhibit similar improvements compared to those combined with Palu. We open-sourced the code.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Zeyu Zhang, Haiying Shen. 2024-08-07. FDC: Fast KV Dimensionality Compression for Efficient LLM Inference. https://arxiv.org/abs/2408.04107
Cite the original work for its findings. Save a collection to share your selection of sources.