Papers › OmniQuant: Omnidirectionally Calibrated Quantization for Large Language Models

OmniQuant: Omnidirectionally Calibrated Quantization for Large Language Models

25 Aug 2023arXiv:2308.13137archive 2025-07-28

Wenqi Shao, Mengzhao Chen, Zhaoyang Zhang, Peng Xu, Lirui Zhao, Zhiqian Li, Kaipeng Zhang, Peng Gao, Yu Qiao, Ping Luo

Large language models (LLMs) have revolutionized natural language processing tasks. However, their practical deployment is hindered by their immense memory and computation requirements. Although recent post-training quantization (PTQ) methods are effective in reducing memory footprint and improving the computational efficiency of LLM, they hand-craft quantization parameters, leading to low performance, especially in extremely low-bit quantization. To tackle this issue, we introduce an Omnidirectionally calibrated Quantization (\textbf{OmniQuant}) technique for LLMs, which achieves good performance in diverse quantization settings while maintaining the computational efficiency of PTQ by efficiently optimizing various quantization parameters. OmniQuant comprises two innovative components including Learnable Weight Clipping (LWC) and Learnable Equivalent Transformation (LET). LWC modulates the extreme values of weights by optimizing the clipping threshold. Meanwhile, LET tackles activation outliers by shifting the challenge of quantization from activations to weights. Operating within a differentiable framework using block-wise error minimization, OmniQuant can optimize the quantization process efficiently for both weight-only and weight-activation quantization. For instance, the LLaMA-2 model family size 7-70B can be processed with OmniQuant on a single A100-40G GPU within 1-16 hours using 128 samples. Extensive experiments validate OmniQuant's superior performance across diverse quantization configurations such as W4A4 (4-bit weight, 4-bit activation), W6A6, W4A16, W3A16, and W2A16. Additionally, OmniQuant demonstrates effectiveness in instruction-tuned models and delivers notable improvements in inference speed and memory reduction on real devices. Codes are available at \url{https://github.com/OpenGVLab/OmniQuant}.

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="2308.13137")

Code

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

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

opengvlab/omniquant officialmentioned in papermentioned on GitHubpytorchMIT report
greenbitai/low_bit_llama 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

16 samples harvested; 9 ran; 0 honoured the contract we drafted; 7 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.

1ran · our draft was wrong
8ran
7unverified

Licence: 0 of the 16 samples are 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 2 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.

ampscaler_get_grad_norm opengvlab/omniquant/utils.py official repository ran MIT (permissive) · c07dba9529e937b7 · report
find_layers opengvlab/omniquant/models/models_utils.py official repository ran MIT (permissive) · 904cd61df2fe8fb9 · report
get_act_scales opengvlab/omniquant/generate_act_scale_shift.py official repository ran MIT (permissive) · bd1c7aaaa05aeaf3 · report
get_act_shifts opengvlab/omniquant/generate_act_scale_shift.py official repository ran MIT (permissive) · 550d556e74fb20f7 · report
make_disjoint_window opengvlab/omniquant/models/models_utils.py official repository ran MIT (permissive) · 4df9168e0a0c38eb · report
sort_layers_by_params opengvlab/omniquant/parallel_utils.py official repository ran MIT (permissive) · aaa7723c864e0a5e · report
truncate_number opengvlab/omniquant/models/transformation.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 94587954e392b665 · report
truncate_number opengvlab/omniquant/models/models_utils.py official repository ran fingerprinted MIT (permissive) · 4e53fbbdfa160f7d · report
assign_layers_to_gpus opengvlab/omniquant/parallel_utils.py official repository unverified MIT (permissive) · 7e3ef1ed347af0f3 · report
build_model_and_tokenizer opengvlab/omniquant/generate_act_scale_shift.py official repository unverified MIT (permissive) · a041d7c9b413c995 · report
create_logger opengvlab/omniquant/utils.py official repository unverified MIT (permissive) · 87877d0c60858bff · report
get_lowest_occupied_gpu opengvlab/omniquant/parallel_utils.py official repository unverified MIT (permissive) · 3c6439a3c61dd2bb · report
get_pile opengvlab/omniquant/datautils.py official repository unverified MIT (permissive) · 3b51341ed1a0b73e · report
get_ptb opengvlab/omniquant/datautils.py official repository unverified MIT (permissive) · bd4f416e271c2fb5 · report
get_wikitext2 opengvlab/omniquant/datautils.py official repository unverified MIT (permissive) · 406294899f965c2f · report
QuantLinear greenbitai/low_bit_llama/model.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · d4c7f5b91441ced1 · report

Tasks

Common Sense ReasoningComputational EfficiencyLarge Language ModelModel 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

SPEED

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