paper-with-me

홈 › Papers

KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cache

2024-02-05 · Zirui Liu, Jiayi Yuan, Hongye Jin, Shaochen Zhong, Zhaozhuo Xu, Vladimir Braverman, Beidi Chen, Xia Hu

Efficiently serving large language models (LLMs) requires batching of many requests to reduce the cost per request. Yet, with larger batch sizes and longer context lengths, the key-value (KV) cache, which stores attention keys and values to avoid re-computations, significantly increases memory demands and becomes the new bottleneck in speed and memory usage. Additionally, the loading of the KV cache causes the computational core to be idle, which limits the inference speed. A straightforward and effective solution to reduce KV cache size is quantization, which decreases the total bytes taken by KV cache. However, there is a lack of in-depth studies that explore the element distribution of KV cache to understand the hardness and limitation of KV cache quantization. To fill the gap, we conducted a comprehensive study on the element distribution in KV cache of popular LLMs. Our findings indicate that the key cache should be quantized per-channel, i.e., group elements along the channel dimension and quantize them together. In contrast, the value cache should be quantized per-token. From this analysis, we developed a tuning-free 2bit KV cache quantization algorithm named KIVI. With hardware-friendly implementation, KIVI can enable Llama, Falcon, and Mistral models to maintain almost the same quality while using $\mathbf{2.6\times}$ less peak memory (including model weight). This reduction in memory usage enables up to $\mathbf{4\times}$ larger batch size, bringing $\mathbf{2.35\times \sim 3.47\times}$ throughput on real LLM inference workload. The source code is available at https://github.com/jy-yuan/KIVI.

📄 PDF Abstract BibTeX arXiv:2402.02750

Code (1)

jy-yuan/kivi 공식 구현 pytorch

Tasks

Quantization

Methods 이 논문이 사용한 방법론

SPEED The monocular depth estimation (MDE) is the task of estimating depth from a single frame. This information is an essential knowledge in many computer vision tasks such as scene…

Similar Papers 제목 키워드 기반

XQuant: Achieving Ultra-Low Bit KV Cache Quantization with Cross-Layer Compression

2025-10-13 · Haoqi Yang, Yao Yao, Zuchao Li, Baoyuan Qi 외 arxiv

Large Language Models (LLMs) have demonstrated remarkable capabilities across diverse natural language processing tasks. However, their extensive memory requirements, particularly due to KV cache growth during long-text …

Benchmarking KV-Cache Optimizations across Task Quality and System Performance for Long-Context Serving

2026-05-03 · Nikita Agrawal, Ruben Mayer arxiv

Large language model serving is increasingly limited by KV-cache growth under long-context workloads, yet existing KV-cache compression techniques are difficult to compare because they were evaluated on different models,…

Few-Shot Learning

InnerQ: Hardware-Aware Tuning-Free Quantization of KV Cache for Large Language Models

2026-02-26 · Sayed Mohammadreza Tayaranian Hosseini, Amir Ardakani, Warren J. Gross arxiv

When transformer-based language models are deployed for text generation, most of the inference time is spent in the decoding stage, where output tokens are generated sequentially. Reducing the hardware cost of each decod…

Text Generation

H1B-KV: Hybrid One-Bit Caches for Memory-Efficient Large Language Model Inference

2025-10-07 · Harshil Vejendla arxiv

Autoregressive decoding in large language models (LLMs) requires caching a growing list of past key-value (KV) pairs, making long-context inference a memory-bound problem. While recent methods have explored quantizing th…

Mathematical ReasoningCode Generation

Alignment Collapse Under KV Cache Quantization: Diagnosis and Mitigation

2026-06-01 · Bruce Changlong Xu, Adarsh Kumarappan, Mu Zhou arxiv

Key-value (KV) cache quantization is widely used to reduce Large Language Model (LLM) inference memory, yet existing evaluations solely focus on measuring perplexity and accuracy without assessing the safety impact. In t…