QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks

Albert Tseng, Jerry Chee, Qingyao Sun, Volodymyr Kuleshov, Christopher De Sa
2/6/2024
cs.LGcs.AIcs.CL

Official code: Cornell-RelaxML/quip-sharp (609 stars, GPL-3.0, last commit 2024-10-29).

Abstract

Post-training quantization (PTQ) reduces the memory footprint of LLMs by quantizing their weights to low-precision. In this work, we introduce QuIP#, a weight-only PTQ method that achieves state-of-the-art results in extreme compression regimes ($\le$ 4 bits per weight) using three novel techniques. First, QuIP# improves QuIP's (Chee et al., 2023) incoherence processing by using the randomized Hadamard transform, which is faster and has better theoretical properties. Second, QuIP# uses vector quantization to take advantage of the ball-shaped sub-Gaussian distribution that incoherent weights possess: specifically, we introduce a set of hardware-efficient codebooks based on the highly symmetric $E_8$ lattice, which achieves the optimal 8-dimension unit ball packing. Third, QuIP# uses fine-tuning to improve fidelity to the original model. Our experiments show that QuIP# outperforms existing PTQ methods, enables new behaviors in PTQ scaling, and supports fast inference. Our code can be found at https://github.com/Cornell-RelaxML/quip-sharp.

View on arXivView PDF

Code Implementations(1)

GPL-3.0
60953C++, CudaNov 22, 20231 years agoGPL-3.0

Similar Papers

Cite this paper

@article{tseng2024quip,
  title  = {QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks},
  author = {Albert Tseng and Jerry Chee and Qingyao Sun and Volodymyr Kuleshov and Christopher De Sa},
  year   = {2024},
  eprint = {2402.04396},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.04396v2},
  journal = {ICML 2024 2024}
}

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

Discussion