FDC: Fast KV Dimensionality Compression for Efficient LLM Inference

Zeyu Zhang, Haiying Shen
8/7/2024
cs.LGcs.DC

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2024fdc,
  title  = {FDC: Fast KV Dimensionality Compression for Efficient LLM Inference},
  author = {Zeyu Zhang and Haiying Shen},
  year   = {2024},
  eprint = {2408.04107},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.04107v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.04107.svg)](https://codeofpaper.com/paper/2408.04107)

Discussion