LogQuant: Log-Distributed 2-Bit Quantization of KV Cache with Superior Accuracy Preservation

Han Chen, Zicong Jiang, Zining Zhang, Bingsheng He, Pingyi Luo +2 more
3/25/2025
cs.LGcs.AIcs.CL

Official code: Concyclics/LogQuantKV (16 stars, last commit 2025-11-03).

Abstract

We introduce LogQuant, a groundbreaking 2-bit quantization technique for KV Cache in large language model (LLM) inference, delivering substantial memory savings while preserving superior performance. Previous methods either assume that later tokens are more important or attempt to predict important tokens based on earlier attention patterns. Both approaches, however, can result in performance bottlenecks or frequent mispredictions. LogQuant takes a different approach. By applying a log-based filtering mechanism, it selectively compresses the KV Cache across the entire context, achieving better performance with the same or even reduced memory footprint compared to existing methods. In benchmark tests, it enhances throughput by 25% and boosts batch size by 60% without increasing memory consumption. For challenging tasks such as Math and Code Completion, LogQuant improves accuracy by 40% to 200% at the same compression ratio, outperforming comparable techniques.LogQuant integrates effortlessly with popular inference frameworks like Python's transformers library. Implementation can be available in https://github.com/Concyclics/LogQuantKV.

View on arXivView PDF

Code Implementations(1)

LogQuantKV, a high precision 2-bit Quantization method

160TeX, ShellAug 2, 202411 months ago

Similar Papers

Cite this paper

@article{chen2025logquant,
  title  = {LogQuant: Log-Distributed 2-Bit Quantization of KV Cache with Superior Accuracy Preservation},
  author = {Han Chen and Zicong Jiang and Zining Zhang and Bingsheng He and Pingyi Luo and Mian Lu and Yuqiang Chen},
  year   = {2025},
  eprint = {2503.19950},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.19950v1}
}

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

Discussion