Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Palu: Compressing KV-Cache with Low-Rank Projection (2407.21118v2)

Published 30 Jul 2024 in cs.AI and cs.LG

Abstract: Post-training KV-Cache compression methods typically either sample a subset of effectual tokens or quantize the data into lower numerical bit width. However, these methods cannot exploit redundancy in the hidden dimension of the KV tensors. This paper presents a hidden dimension compression approach called Palu, a KV-Cache compression framework that utilizes low-rank projection to reduce inference-time LLM memory usage. Palu decomposes the linear layers into low-rank matrices, caches compressed intermediate states, and reconstructs the full keys and values on the fly. To improve accuracy, compression rate, and efficiency, Palu further encompasses (1) a medium-grained low-rank decomposition scheme, (2) an efficient rank search algorithm, (3) low-rank-aware quantization compatibility enhancements, and (4) optimized GPU kernels with operators fusion. Extensive experiments with popular LLMs show that Palu compresses KV-Cache by 50% while maintaining strong accuracy and delivering up to 1.89x on the RoPE-based attention module. When combined with quantization, Palu's inherent quantization-friendly design yields small to negligible extra accuracy degradation while saving additional memory than quantization-only methods and achieving up to 2.91x speedup for the RoPE-based attention. Moreover, it maintains comparable or even better accuracy (up to 1.19 lower perplexity) compared to quantization-only methods. These results demonstrate Palu's superior capability to effectively address the efficiency and memory challenges of LLM inference posed by KV-Cache. Our code is publicly available at: https://github.com/shadowpa0327/Palu

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (10)
  1. Chi-Chih Chang (13 papers)
  2. Wei-Cheng Lin (7 papers)
  3. Chien-Yu Lin (14 papers)
  4. Chong-Yan Chen (1 paper)
  5. Yu-Fang Hu (1 paper)
  6. Pei-Shuo Wang (2 papers)
  7. Ning-Chi Huang (5 papers)
  8. Luis Ceze (38 papers)
  9. Kai-Chiang Wu (11 papers)
  10. Mohamed S. Abdelfattah (37 papers)
Github Logo Streamline Icon: https://streamlinehq.com