CSR:Achieving 1 Bit Key-Value Cache via Sparse Representation

Hongxuan Zhang, Yao Zhao, Jiaqi Zheng, Chenyi Zhuang, Jinjie Gu +1 more
12/16/2024
cs.CL

No confident code implementation found for this paper.

Abstract

The emergence of long-context text applications utilizing large language models (LLMs) has presented significant scalability challenges, particularly in memory footprint. The linear growth of the Key-Value (KV) cache responsible for storing attention keys and values to minimize redundant computations can lead to substantial increases in memory consumption, potentially causing models to fail to serve with limited memory resources. To address this issue, we propose a novel approach called Cache Sparse Representation (CSR), which converts the KV cache by transforming the dense Key-Value cache tensor into sparse indexes and weights, offering a more memory-efficient representation during LLM inference. Furthermore, we introduce NeuralDict, a novel neural network-based method for automatically generating the dictionary used in our sparse representation. Our extensive experiments demonstrate that CSR achieves performance comparable to state-of-the-art KV cache quantization algorithms while maintaining robust functionality in memory-constrained environments.

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{zhang2024csrachieving,
  title  = {CSR:Achieving 1 Bit Key-Value Cache via Sparse Representation},
  author = {Hongxuan Zhang and Yao Zhao and Jiaqi Zheng and Chenyi Zhuang and Jinjie Gu and Guihai Chen},
  year   = {2024},
  eprint = {2412.11741},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.11741v1}
}

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/2412.11741.svg)](https://codeofpaper.com/paper/2412.11741)

Discussion