Lune

HPCA2025顶会

VQ-LLM: High-performance Code Generation for Vector Quantization Augmented LLM Inference

Zihan Liu, Xinhao Luo, Junxian Guo, Wentao Ni, Yangjie Zhou, Yue Guan, Cong Guo, Weihao Cui, Yu Feng, Minyi Guo, Yuhao Zhu, Minjia Zhang

摘要

Vector quantization (VQ), which treats a vector as a compression unit, gains increasing research interests for its potential to accelerate large language models (LLMs). Compared to conventional element-wise quantization methods, VQ algorithms can compress weight and KV cache tensors in LLMs with a greater ratio while maintaining the high model accuracy. However, translating a VQ algorithm’s memory reduction into the actual latency improvement is challenging. We profile and analyze the current approach of integrating VQ into computation kernels and show that its major inefficiency lies in the poor access efficiency of codebooks in VQ algorithms and uncoordinated computation dataflow. Meanwhile, the diversity of VQ algorithms (e.g., different vector sizes and entry counts) and LLMs, computation kernels (e.g matrix-matrix/vector multiplication and attention computation) makes it impractical to manually craft efficient kernel implementations for each specific case. In this work, we design and implement VQ-LLM, an efficient fused VQ kernel generation framework. We first introduce a software abstraction called codebook cache to optimize codebook access efficiency and support the integration of VQ with various computations. The codebook cache adaptively stores different entries across the GPU’s memory hierarchy, including off-chip global memory, on-chip shared memory, and registers. Centered around the codebook cache, we design an efficient computation engine that optimizes memory traffic during computations involving codebooks. This compute engine adopts the codebook-centric dataflow and fusion optimizations. Additionally, we provide adaptive heuristics to tailor parameter selection in our optimizations to diverse VQ configurations. Our optimizations achieve the latency reduction of 64.36%\mathbf{6 4. 3 6 \%} to 99.1%\mathbf{9 9. 1 \%} compared to existing open-source implementations. A final comparison with state-of-the-art element-wise quantization methods like AWQ and QoQ shows that our VQ-LLM is practically viable, achieving latencies close or even better latencies to those at equivalent bit-widths, potentially offering greater accuracy.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels 引用了 ClusterFusion: Expanding Operator Fusion Scope for LLM Inference via Cluster-Level Collective Primitive
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Efficient Memory Management for Large Language Model Serving with PagedAttention 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Transitive Array: An Efficient GEMM Accelerator with Result Reuse 引用了 SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
  • ClusterFusion: Expanding Operator Fusion Scope for LLM Inference via Cluster-Level Collective Primitive 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • ClusterFusion: Expanding Operator Fusion Scope for LLM Inference via Cluster-Level Collective Primitive 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • ClusterFusion: Expanding Operator Fusion Scope for LLM Inference via Cluster-Level Collective Primitive 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
  • Yggdrasil: Bridging Dynamic Speculation and Static Runtime for Latency-Optimal Tree-Based LLM Decoding 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
  • VecInfer: Efficient LLM Inference with Low-Bit KV Cache via Outlier-Suppressed Vector Quantization 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • VecInfer: Efficient LLM Inference with Low-Bit KV Cache via Outlier-Suppressed Vector Quantization 引用了 SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models
  • VecInfer: Efficient LLM Inference with Low-Bit KV Cache via Outlier-Suppressed Vector Quantization 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • VecInfer: Efficient LLM Inference with Low-Bit KV Cache via Outlier-Suppressed Vector Quantization 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper11

  1. ClusterFusion: Expanding Operator Fusion Scope for LLM Inference via Cluster-Level Collective PrimitiveXinhao Luo, Zihan Liu, Yangjie Zhou, Shihan Fang 等NeurIPS 2025 · 9 次引用
  2. Transitive Array: An Efficient GEMM Accelerator with Result ReuseCong Guo, Chiyue Wei, Jiaming Tang, Bowen Duan 等ISCA 2025 · 8 次引用
  3. Yggdrasil: Bridging Dynamic Speculation and Static Runtime for Latency-Optimal Tree-Based LLM DecodingYue Guan, Changming Yu, Shihan Fang, Weiming Hu 等NeurIPS 2025 · 4 次引用
  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. CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention KernelsXing Ma, Yangjie Zhou, Wu Sun, Zihan Liu 等ACL 2026 · 2 次引用

它引用的 Paper24

  1. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
  2. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
  3. SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language ModelsGuangxuan Xiao, Ji Lin, Mickaël Seznec, Hao Wu 等ICML 2023 · 1,493 次引用
  4. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用
  5. ZeRO: memory optimizations toward training trillion parameter modelsSamyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong HeSC 2020 · 852 次引用

相关 Paper

  1. EVA: Accelerating LLM Decoding via an Efficient Vector Quantization ArchitectureBowen Duan, Cong Guo, Chiyue Wei, Haoxuan Shan 等ISCA 2026 · 2 次引用
  2. KVO-LLM: Boosting Long-Context Generation Throughput for Batched LLM InferenceZhenyu Li, Dongxu Lyu, Gang Wang, Yuzhou Chen 等DAC 2025 · 1 次引用
  3. CodeGEMM: A Codebook-Centric Approach to Efficient GEMM in Quantized LLMsGunho Park, Jeongin Bae, Byeongwook Kim, Baeseong Park 等NeurIPS 2025 · 3 次引用
  4. AQPIM: Breaking the PIM Capacity Wall for LLMs with in-Memory Activation QuantizationKosuke Matsushima, Yasuyuki Okoshi, Masato Motomura, Daichi FujikiHPCA 2026 · 1 次引用
  5. MILLION: MasterIng Long-Context LLM Inference Via Outlier-Immunized KV Product QuaNtizationZongwu Wang, Peng Xu, Fangxin Liu, Yiwei Hu 等DAC 2025 · 6 次引用
黄昏的海面,两侧是细线勾勒的悬崖