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
- Quantization from the ground upngrok.com
- [2005.14165] Language Models are Few-Shot Learnersarxiv.org
- 2305.14314arxiv.org
- Compression and Intelligencegreene.sh
- [2309.10668] Language Modeling Is Compressionarxiv.org
- A Guide to Quantization in LLMs | Symbl.aisymbl.ai
- [2510.11696] QeRL: Beyond Efficiency -- Quantization-enhanced Reinforcement Learning for LLMsarxiv.org
- [2106.09685] LoRA: Low-Rank Adaptation of Large Language Modelsarxiv.org
- Efficient LLM inferencefinbarrtimbers.substack.com
- GPT in 60 Lines of NumPy | Jay Modyjaykmody.com
- Transformers Inference Optimization Toolset | AstraBlogastralord.github.io