Papers › DuQuant: Distributing Outliers via Dual Transformation Makes Stronger Quantized LLMs

DuQuant: Distributing Outliers via Dual Transformation Makes Stronger Quantized LLMs

3 Jun 2024arXiv:2406.01721archive 2025-07-28

Haokun Lin, Haobo Xu, Yichen Wu, Jingzhi Cui, Yingtao Zhang, Linzhan Mou, Linqi Song, Zhenan Sun, Ying WEI

Quantization of large language models (LLMs) faces significant challenges, particularly due to the presence of outlier activations that impede efficient low-bit representation. Traditional approaches predominantly address Normal Outliers, which are activations across all tokens with relatively large magnitudes. However, these methods struggle with smoothing Massive Outliers that display significantly larger values, which leads to significant performance degradation in low-bit quantization. In this paper, we introduce DuQuant, a novel approach that utilizes rotation and permutation transformations to more effectively mitigate both massive and normal outliers. First, DuQuant starts by constructing the rotation matrix, using specific outlier dimensions as prior knowledge, to redistribute outliers to adjacent channels by block-wise rotation. Second, We further employ a zigzag permutation to balance the distribution of outliers across blocks, thereby reducing block-wise variance. A subsequent rotation further smooths the activation landscape, enhancing model performance. DuQuant simplifies the quantization process and excels in managing outliers, outperforming the state-of-the-art baselines across various sizes and types of LLMs on multiple tasks, even with 4-bit weight-activation quantization. Our code is available at https://github.com/Hsu1023/DuQuant.

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

Code

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

By repository: official repository: 13 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hsu1023/duquant officialmentioned in papermentioned on GitHubpytorchMIT 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

13 samples harvested; 10 ran; 0 honoured the contract we drafted; 3 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
7ran
3unverified

Licence: 0 of the 13 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 Hsu1023/DuQuant. “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.

build_model_and_tokenizer Hsu1023/DuQuant/generate_act_scale_shift.py official repository ran MIT (permissive) · 8c5df57a3d2b01ae · report
find_layers Hsu1023/DuQuant/models/models_utils.py official repository ran MIT (permissive) · 904cd61df2fe8fb9 · report
format_example Hsu1023/DuQuant/mmlu_eval.py official repository ran · our draft was wrong MIT (permissive) · cd763eaf1ac287e7 · report
format_subject Hsu1023/DuQuant/mmlu_eval.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 6ab745408cb8648b · report
gen_prompt Hsu1023/DuQuant/mmlu_eval.py official repository ran MIT (permissive) · 3383488ea82b6c15 · report
get_act_scales Hsu1023/DuQuant/generate_act_scale_shift.py official repository ran MIT (permissive) · bd1c7aaaa05aeaf3 · report
get_act_shifts Hsu1023/DuQuant/generate_act_scale_shift.py official repository ran MIT (permissive) · 550d556e74fb20f7 · report
make_disjoint_window Hsu1023/DuQuant/models/models_utils.py official repository ran MIT (permissive) · 4df9168e0a0c38eb · report
truncate_number Hsu1023/DuQuant/models/transformation.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 94587954e392b665 · report
truncate_number Hsu1023/DuQuant/models/models_utils.py official repository ran fingerprinted MIT (permissive) · 4e53fbbdfa160f7d · report
get_pile Hsu1023/DuQuant/datautils.py official repository unverified MIT (permissive) · 3b51341ed1a0b73e · report
get_ptb Hsu1023/DuQuant/datautils.py official repository unverified MIT (permissive) · bd4f416e271c2fb5 · report
get_wikitext2 Hsu1023/DuQuant/datautils.py official repository unverified MIT (permissive) · 406294899f965c2f · report

Tasks

ManagementQuantization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Focus

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