GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers

By Elias Frantar, Saleh Ashkboos, Torsten Hoefler, Dan Alistarh. 2022

2,286 citations recorded by the source corpus.

Generative Pre-trained Transformer models, known as GPT or OPT, set themselves apart through breakthrough performance across complex language modelling tasks, but also by their extremely high computational and storage costs. Specifically, due to their massive size, even inference for large, highly-accurate GPT models may require multiple performant GPUs, which limits the usability of such models. While there is emerging work on relieving this pressure via model compression, the applicability and performance of existing compression techniques is limited by the scale and complexity of GPT models. In this paper, we address this challenge, and propose GPTQ, a new one-shot weight quantization method based on approximate second-order information, that is both highly-accurate and highly-efficient. Specifically, GPTQ can quantize GPT models with 175 billion parameters in approximately four GPU hours, reducing the bitwidth down to 3 or 4 bits per weight, with negligible accuracy degradation relative to the uncompressed baseline. Our method more than doubles the compression gains relative to previously-proposed one-shot quantization methods, preserving accuracy, allowing us for the first time to execute an 175 billion-parameter model inside a single GPU for generative inference. Moreover, we also show that our method can still provide reasonable accuracy in the extreme quantization regime, in which weights are quantized to 2-bit or even ternary quantization levels. We show experimentally that these improvements can be leveraged for end-to-end inference speedups over FP16, of around 3.25x when using high-end GPUs (NVIDIA A100) and 4.5x when using more cost-effective ones (NVIDIA A6000). The implementation is available at https://github.com/IST-DASLab/gptq.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Large Language Models, Efficiency & Compression

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Luke S. Zettlemoyer
  2. Yejin Choi
  3. Mohit Bansal
  4. Percy Liang
  5. Hannaneh Hajishirzi
  6. Jianfeng Gao
  7. Noah A. Smith
  8. Quoc V. Le

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Yu Qiao
  4. Xiaogang Wang
  5. Trevor Darrell
  6. Ming-Hsuan Yang
  7. Jitendra Malik
  8. Andrew Zisserman

In Large Language Models

  1. Tim Dettmers
  2. Luke S. Zettlemoyer
  3. Yejin Choi
  4. Christopher R'e
  5. Dan Alistarh
  6. Elias Frantar
  7. Percy Liang
  8. Torsten Hoefler

In Efficiency & Compression

  1. Dan Alistarh
  2. Luke S. Zettlemoyer
  3. Elias Frantar
  4. Tim Dettmers
  5. Torsten Hoefler
  6. Song Han
  7. Ji Lin
  8. Tri Dao

Citations in the corpus