Skip to main content
archive
Search Submit Donate Log in
Press Enter to search · Advanced search

Computer Science > Machine Learning

arXiv:2210.17323 (cs)
[Submitted on 31 Oct 2022 (v1), last revised 22 Mar 2023 (this version, v2)]

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

Authors:Elias Frantar, Saleh Ashkboos, Torsten Hoefler, Dan Alistarh
View a PDF of the paper titled GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers, by Elias Frantar and 3 other authors
View PDF HTML (experimental)
Abstract: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 this https URL.
Comments: ICLR 2023
Subjects: Machine Learning (cs.LG)
Cite as: arXiv:2210.17323 [cs.LG]
  (or arXiv:2210.17323v2 [cs.LG] for this version)
  https://doi.org/10.48550/arXiv.2210.17323
arXiv-issued DOI via DataCite

Submission history

From: Elias Frantar [view email]
[v1] Mon, 31 Oct 2022 13:42:40 UTC (154 KB)
[v2] Wed, 22 Mar 2023 13:10:47 UTC (189 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers, by Elias Frantar and 3 other authors
  • View PDF
  • HTML (experimental)
  • TeX Source
license icon view license

Current browse context:

cs.LG
< prev   |   next >
new | recent | 2022-10
Change to browse by:
cs

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar

2 blog links

(what is this?)
Loading...

BibTeX formatted citation

Data provided by:

Bookmark

BibSonomy Reddit

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
IArxiv Recommender (What is IArxiv?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
We gratefully acknowledge support from our major funders, member institutions, , and all contributors.
About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab)
Major funding support from
Simons Foundation Simons Foundation International Schmidt Sciences