QuIP: 2-Bit Quantization of Large Language Models With Guarantees

Jerry Chee, Yaohui Cai, Volodymyr Kuleshov, Christopher De Sa
7/25/2023
cs.LGcs.CL

Official code: Cornell-RelaxML/QuIP (400 stars, last commit 2024-02-24).

Abstract

This work studies post-training parameter quantization in large language models (LLMs). We introduce quantization with incoherence processing (QuIP), a new method based on the insight that quantization benefits from $\textit{incoherent}$ weight and Hessian matrices, i.e., from the weights being even in magnitude and the directions in which it is important to round them accurately being unaligned with the coordinate axes. QuIP consists of two steps: (1) an adaptive rounding procedure minimizing a quadratic proxy objective; (2) efficient pre- and post-processing that ensures weight and Hessian incoherence via multiplication by random orthogonal matrices. We complement QuIP with the first theoretical analysis for an LLM-scale quantization algorithm, and show that our theory also applies to an existing method, OPTQ. Empirically, we find that our incoherence preprocessing improves several existing quantization algorithms and yields the first LLM quantization methods that produce viable results using only two bits per weight. Our code can be found at https://github.com/Cornell-RelaxML/QuIP.

View on arXivView PDF

Code Implementations(1)

Code for paper: "QuIP: 2-Bit Quantization of Large Language Models With Guarantees"

40039PythonJul 21, 20232 years ago

Similar Papers

Cite this paper

@article{chee2023quip,
  title  = {QuIP: 2-Bit Quantization of Large Language Models With Guarantees},
  author = {Jerry Chee and Yaohui Cai and Volodymyr Kuleshov and Christopher De Sa},
  year   = {2023},
  eprint = {2307.13304},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.13304v2},
  journal = {NEURIPS 2023 2023}
}

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

Discussion