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

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

31 Oct 2022arXiv:2210.17323archive 2025-07-28

Elias Frantar, Saleh Ashkboos, Torsten Hoefler, Dan Alistarh

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2210.17323")

Code

Syntology Ran 5 of 15 code samples harvested from 7 repositories linked to this paper; 10 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 4 samples from 1 repository, 1 ran; community (archive-listed): 11 samples from 6 repositories, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

17 repositories listed; official and paper-mentioned ones first.

ist-daslab/gptq officialmentioned in papermentioned on GitHubpytorch report
bentoml/openllm mentioned on GitHubApache-2.0 report
cornell-zhang/llm-datatypes mentioned on GitHubtf report
dfki-nlp/llmcheckup mentioned on GitHubpytorch report
ecolab-postech/owq mentioned on GitHubpytorch report
eth-easl/deltazip mentioned on GitHubpytorch report
greenbitai/low_bit_llama mentioned on GitHubpytorch report
huggingface/text-generation-inference mentioned on GitHubpytorch report
microsoft/bitblas mentioned on GitHubpytorchMIT report
mit-han-lab/llm-awq mentioned on GitHubpytorch report
qwopqwop200/GPTQ-for-LLaMa mentioned on GitHubpytorch report
rasmith/vllm mentioned on GitHubjaxApache-2.0 report
thudm/chatglm-6b mentioned on GitHubpytorchApache-2.0 report
vectorch-ai/scalellm mentioned on GitHubpytorch report
vllm-project/vllm mentioned on GitHubpytorch report
xvyaward/owq mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 5 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
2ran
10unverified

Licence: 1 of the 15 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 7 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_opt IST-DASLab/gptq/opt.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 887f43fe08a6472d · report
GPTQ ist-daslab/gptq/gptq.py official repository unverified Apache-2.0 (permissive) · cdbcb9ec70b30c58 · report
opt_pack3 IST-DASLab/gptq/opt.py official repository unverified Apache-2.0 (permissive) · 5a1ab8a11275fe3d · report
opt_sequential IST-DASLab/gptq/opt.py official repository unverified Apache-2.0 (permissive) · 60602426146a6763 · report
GPTQ PanQiWei/AutoGPTQ/auto_gptq/quantization/gptq.py community (archive-listed) ran MIT (permissive) · 6729f9f2a233d315 · report
Logger cornell-zhang/llm-datatypes/neural_compressor/torch/algorithms/weight_only/gptq.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · c1a5aa86dbaf659b · report
torch_snr_error qwopqwop200/GPTQ-for-LLaMa/gptq.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · a855208c73825af0 · report
torch_snr_error huggingface/text-generation-inference/server/text_generation_server/layers/gptq/quantize.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 671302aaa20f0ee9 · report
GPTQ qwopqwop200/GPTQ-for-LLaMa/gptq.py community (archive-listed) unverified Apache-2.0 (permissive) · 6164b2bb82400dba · report
GPTQ cornell-zhang/llm-datatypes/neural_compressor/torch/algorithms/weight_only/gptq.py community (archive-listed) unverified Apache-2.0 (permissive) · f4d20c4a7bccc9a2 · report
GPTQ huggingface/text-generation-inference/server/text_generation_server/layers/gptq/quantize.py community (archive-listed) unverified Apache-2.0 (permissive) · 0747a1d535734929 · report
GPTQ_OWQ ecolab-postech/owq/owq/recon.py community (archive-listed) unverified no licence file found · pointer only · c30c4d1c0c0838ff · report
Kernel vectorch-ai/scalellm/src/kernels/quantization/marlin/generate_instantiations.py community (archive-listed) unverified Apache-2.0 (permissive) · 2e160e59dad498ff · report
Quantizer cornell-zhang/llm-datatypes/neural_compressor/torch/algorithms/weight_only/gptq.py community (archive-listed) unverified Apache-2.0 (permissive) · dd6638bb4690fc4c · report
Quantizer huggingface/text-generation-inference/server/text_generation_server/layers/gptq/quantize.py community (archive-listed) unverified Apache-2.0 (permissive) · 7452671bd2402cf2 · report

Tasks

Language ModellingModel CompressionQuantization

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDiscriminative Fine-TuningDropoutGPTLabel SmoothingLayer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionOPTPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformerWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections