VPTQ: Extreme Low-bit Vector Post-Training Quantization for Large Language Models

Yifei Liu, Jicheng Wen, Yang Wang, Shengyu Ye, Li Lyna Zhang, Ting Cao, Cheng Li, Mao Yang

Abstract

Large Language Models (LLMs) face significant deployment challenges due to their immense memory requirements. While 4-bit scalar quantization has become a standard, pushing models to 2-bit depths often results in severe accuracy degradation or prohibitive inference overhead. This paper introduces Vector Post-Training Quantization (VPTQ), a framework that leverages second-order optimization to achieve extreme low-bit quantization. By utilizing Hessian-guided vector quantization and hardware-aware dequantization, VPTQ maintains high accuracy and achieves up to a 1.8× increase in throughput compared to existing state-of-the-art methods.

Introduction

The scaling of Large Language Models to hundreds of billions of parameters has revolutionized natural language processing but created a massive memory bottleneck. For instance, a LLaMA-2 70B model in FP16 precision requires approximately 140GB of VRAM, necessitating expensive multi-GPU clusters for even basic inference.

To mitigate this, quantization techniques reduce the bit-width of model weights. Scalar quantization (e.g., GPTQ, AWQ) is effective at 4 bits but struggles at 2 bits, where the limited numerical range cannot capture the weight distribution's complexity. Vector Quantization (VQ) offers a more expressive alternative by grouping weights into vectors and mapping them to a codebook. However, existing VQ methods often suffer from a "trilemma" of poor accuracy, slow quantization processes, or high inference overhead due to complex transformations. VPTQ aims to solve all three by providing a lightweight, accurate, and hardware-friendly VQ framework.

Methodology

VPTQ addresses the VQ trilemma through several algorithmic innovations designed for both mathematical rigor and hardware efficiency.

Hessian-Guided Vector Quantization

The core of VPTQ is the use of the Hessian matrix—which captures how sensitive the model's loss is to specific weights—to guide the quantization process. Unlike previous methods that use the Hessian only for weight refinement, VPTQ integrates it into the entire pipeline:

  1. Hessian-Weighted Centroid Initialization: During the creation of the VQ codebook, VPTQ uses the Hessian to weight the importance of specific weights. This ensures that the clustering algorithm (K-means) prioritizes accuracy for weights that most significantly impact model performance.
  2. Channel-Independent Optimization: To avoid the error accumulation seen in multi-column quantization methods, VPTQ quantizes each channel independently. This simplifies the optimization landscape and significantly accelerates the quantization process.

Residual and Outlier Management

To further minimize quantization error, VPTQ employs a residual quantization strategy where a second codebook captures the errors left by the primary pass. Additionally, the framework identifies "outlier" weights—small subsets of parameters that are highly sensitive to precision loss—and treats them with higher precision to preserve model integrity.

Hardware-Aware Inference

A major bottleneck in VQ is the dequantization step during inference. VPTQ is designed to use simple Lookup Table (LUT) operations on the GPU. By avoiding complex mathematical transforms (like the Hadamard transform used in QuIP#), VPTQ ensures that the reduced memory footprint translates directly into faster token generation. The authors found that longer vectors (e.g., length 12) with larger codebooks (e.g., 65536 entries) are particularly hardware-efficient as they align well with GPU cache line sizes.

Experimental Results

The authors evaluated VPTQ across LLaMA-2 (7B to 70B), LLaMA-3 (8B, 70B), and Mistral-7B models using WikiText-2, C4, and various zero-shot reasoning tasks (PIQA, HellaSwag, WinoGrande, etc.).

Accuracy at Extreme Compression

VPTQ demonstrates state-of-the-art performance at 2-bit depths. On LLaMA-2, it reduced perplexity by 0.01–0.34 compared to previous SOTA methods. The gains were even more pronounced on LLaMA-3 70B, where VPTQ achieved a perplexity improvement of 4.41–7.34 over competing 2-bit frameworks. In zero-shot QA tasks, VPTQ-quantized LLaMA-3 models showed an 11–22% accuracy advantage, maintaining usability where other methods often produced unusable results.

Efficiency and Throughput

VPTQ is not only more accurate but also more practical to deploy. The quantization process itself is remarkably efficient, requiring only 10.4–18.6% of the time needed by AQLM. More importantly, the hardware-optimized dequantization leads to a 1.6–1.8× increase in inference throughput compared to other high-performance VQ techniques.

Conclusion

VPTQ represents a significant step forward in LLM compression, proving that 2-bit quantization is viable for production-scale models. By combining second-order optimization with hardware-aware design, it breaks the VQ trilemma, offering a path toward running massive models on consumer-grade hardware without sacrificing performance. Future work will focus on extended fine-tuning to further bridge the gap between 2-bit and 4-bit model accuracy.

Code Availability: The implementation is open-sourced at https://github.com/microsoft/VPTQ.

Summary updated

BibTeX
@inproceedings{liu2024vptq,
  author = {Yifei Liu and Jicheng Wen and Yang Wang and Shengyu Ye and Li Lyna Zhang and Ting Cao and Cheng Li and Mao Yang},
  title = {{VPTQ: Extreme Low-bit Vector Post-Training Quantization for Large Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.467},
}
Figure