Lune

NeurIPS2024顶会

KVQuant: Towards 10 Million Context Length LLM Inference with KV Cache Quantization

Coleman Hooper, Sehoon Kim, Hiva Mohammadzadeh, Michael W. Mahoney, Yakun Sophia Shao, Kurt Keutzer, Amir Gholami

摘要

LLMs are seeing growing use for applications which require large context windows, and with these large context windows KV cache activations surface as the dominant contributor to memory consumption during inference. Quantization is a promising approach for compressing KV cache activations; however, existing solutions fail to represent activations accurately in sub-4-bit precision. Our work, KVQuant, facilitates low precision KV cache quantization by incorporating several novel methods: (i) Per-Channel Key Quantization, where we adjust the dimension along which we quantize the Key activations to better match the distribution; (ii) Pre-RoPE Key Quantization, where we quantize Key activations before the rotary positional embedding to mitigate its impact on quantization; (iii) Non-Uniform KV Cache Quantization, where we derive per-layer sensitivity-weighted non-uniform datatypes that better represent the distributions; and (iv) Per-Vector Dense-and-Sparse Quantization, where we isolate outliers separately for each vector to minimize skews in quantization ranges. By applying our method to the LLaMA, Llama-2, Llama-3, and Mistral models, we achieve<0.1 perplexity degradation with 3-bit quantization on both Wikitext-2 and C4, outperforming existing approaches. Our method enables serving LLaMA-7B with a context length of up to 1 million on a single A100-80GB GPU and up to 10 million on an 8-GPU system. We develop custom CUDA kernels for KVQuant, showing that we can achieve up to 1.7x speedups, compared to baseline fp16 matrix-vector multiplications, for the LLaMA-7B model.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 92 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
  • Efficient Streaming Language Models with Attention Sinks 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion 引用了 CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving 引用了 CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion
  • CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Reducing Transformer Key-Value Cache Size with Cross-Layer Attention 引用了 FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU
  • Reducing Transformer Key-Value Cache Size with Cross-Layer Attention 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving 引用了 SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving 引用了 FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
  • SnapKV: LLM Knows What You are Looking for Before Generation 引用了 Efficient Streaming Language Models with Attention Sinks
  • SnapKV: LLM Knows What You are Looking for Before Generation 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot 引用了 Reducing Transformer Key-Value Cache Size with Cross-Layer Attention
  • Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot 引用了 CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot 引用了 FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 Efficient Streaming Language Models with Attention Sinks
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 Reducing Transformer Key-Value Cache Size with Cross-Layer Attention
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper92

  1. Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM ChatbotRuoyu Qin, Zheming Li, Weiran He, Jialei Cui 等FAST 2025 · 337 次引用
  2. Reducing Transformer Key-Value Cache Size with Cross-Layer AttentionWilliam Brandon, Mayank Mishra, Aniruddha Nrusimha, Rameswar Panda 等NeurIPS 2024 · 150 次引用
  3. Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level ComputationSangmin Bae, Yujin Kim, Reza Bayat, Sungnyun Kim 等NeurIPS 2025 · 143 次引用
  4. CacheGen: KV Cache Compression and Streaming for Fast Large Language Model ServingYuhan Liu, Hanchen Li, Yihua Cheng, Siddhant Ray 等SIGCOMM 2024 · 111 次引用
  5. CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge FusionJiayi Yao, Hanchen Li, Yuhan Liu, Siddhant Ray 等EuroSys 2025 · 68 次引用

它引用的 Paper20

  1. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
  2. SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language ModelsGuangxuan Xiao, Ji Lin, Mickaël Seznec, Hao Wu 等ICML 2023 · 1,493 次引用
  3. SnapKV: LLM Knows What You are Looking for Before GenerationYuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh 等NeurIPS 2024 · 1,019 次引用
  4. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用
  5. FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUYing Sheng, Lianmin Zheng, Binhang Yuan, Zhuohan Li 等ICML 2023 · 683 次引用

相关 Paper

  1. QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMsSaleh Ashkboos, Amirkeivan Mohtashami, Maximilian L. Croci, Bo Li 等NeurIPS 2024 · 723 次引用
  2. KVmix: Gradient-Based Layer Importance-Aware Mixed-Precision Quantization for KV CacheFei Li, Song Liu, Weiguo Wu, Shiqiang Nie 等AAAI 2026 · 1 次引用
  3. CommVQ: Commutative Vector Quantization for KV Cache CompressionJunyan Li, Yang Zhang, Muhammad Yusuf Hassan, Talha Chafekar 等ICML 2025
  4. VecInfer: Efficient LLM Inference with Low-Bit KV Cache via Outlier-Suppressed Vector QuantizationDingyu Yao, Chenxu Yang, Zhengyang Tong, Zheng Lin 等ACL 2026 · 4 次引用
  5. COMET: Towards Practical W4A4KV4 LLMs ServingLian Liu, Long Cheng, Haimeng Ren, Zhaohui Xu 等ASPLOS 2025 · 5 次引用
黄昏的海面,两侧是细线勾勒的悬崖