GPTQ: Accurate Post-Training Quantization for Generative Pre-Trained Transformers
Generative Pre-trained Transformer (GPT) models 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 to execute, 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. We show experimentally that these improvements can be leveraged for end-to-end inference speedups over FP16, of around 2x when using high-end GPUs (NVIDIA A100) and 4x when using more cost-effective ones (NVIDIA A6000). The implementation is available at this https URL.
Published as a conference paper at ICLR 2023 GPTQ: ACCURATE P OST-T RAINING Q UANTIZATION FOR G ENERATIVE P RE - TRAINED T RANSFORMERS Elias Frantar∗ Saleh Ashkboos Torsten Hoefler Dan Alistarh IST Austria ETH Zurich ETH Zurich IST Austria & NeuralMagic A BSTRACT…
related reading
- 2210.17323arxiv.org
- A Guide to Quantization in LLMs | Symbl.aisymbl.ai
- Quantization · Hugging Facehuggingface.co
- Efficient LLM inferencefinbarrtimbers.substack.com
- Quantization from the ground upngrok.com
- GPT in 60 Lines of NumPy | Jay Modyjaykmody.com
- 2305.14314arxiv.org
- TurboQuant: Redefining AI efficiency with extreme compressionresearch.google
- LLM Inference Performance Engineering: Best Practices | Databricks Blogdatabricks.com
- Compression and Intelligencegreene.sh
- Accelerated Inference for Large Transformer Models Using NVIDIA Triton Inference Server | NVIDIA Technical Blogdeveloper.nvidia.com
- What Makes Low-Bit Quantization-Aware Training Work for Reasoning LLMs? A Systematic Studyarxiv.org