Papers › OstQuant: Refining Large Language Model Quantization with Orthogonal and Scaling...

OstQuant: Refining Large Language Model Quantization with Orthogonal and Scaling Transformations for Better Distribution Fitting

23 Jan 2025arXiv:2501.13987archive 2025-07-28

Xing Hu, Yuan Cheng, Dawei Yang, Zukang Xu, Zhihang Yuan, Jiangyong Yu, Chen Xu, Zhe Jiang, Sifan Zhou

Post-training quantization (PTQ) has emerged as a widely adopted technique for compressing and accelerating Large Language Models (LLMs). The major challenge in LLM quantization is that uneven and heavy-tailed data distributions can expand the quantization range, thereby reducing bit precision for most values. Recent methods attempt to eliminate outliers and balance inter-channel differences by employing linear transformations; however, they remain heuristic and are often overlook optimizing the data distribution across the entire quantization space.In this paper, we introduce Quantization Space Utilization Rate (QSUR), a novel metric that effectively assesses the quantizability of transformed data by measuring the space utilization of the data in the quantization space. We complement QSUR with mathematical derivations that examine the effects and limitations of various transformations, guiding our development of Orthogonal and Scaling Transformation-based Quantization (OSTQuant). OSQuant employs a learnable equivalent transformation, consisting of an orthogonal transformation and a scaling transformation, to optimize the distributions of weights and activations across the entire quantization space. Futhermore, we propose the KL-Top loss function, designed to mitigate noise during optimization while retaining richer semantic information within the limited calibration data imposed by PTQ. OSTQuant outperforms existing work on various LLMs and benchmarks. In the W4-only setting, it retains 99.5\% of the floating-point accuracy. In the more challenging W4A4KV4 configuration, OSTQuant reduces the performance gap by 32\% on the LLaMA-3-8B model compared to state-of-the-art methods. \href{https://github.com/BrotherHappy/OSTQuant}{https://github.com/BrotherHappy/OSTQuant}.

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

Code

Syntology Ran 2 of 15 code samples harvested from 1 repository linked to this paper; 13 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran · fixture could not drive it.

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

brotherhappy/ostquant officialmentioned in paperpytorchApache-2.0 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; 2 ran; 0 honoured the contract we drafted; 13 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
1ran · fixture could not drive it
13unverified

Licence: 0 of the 15 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 brotherhappy/ostquant. “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.

repeat_kv brotherhappy/ostquant/models/modeling_llama.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · ab40781baaa35b67 · report
rotate_half brotherhappy/ostquant/models/modeling_llama.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 0ad8d888b1eb9c46 · report
Cayley_loop brotherhappy/ostquant/quant/cayley_opt.py official repository unverified Apache-2.0 (permissive) · be60121819dc107b · report
apply_rotary_pos_emb brotherhappy/ostquant/models/modeling_llama.py official repository unverified Apache-2.0 (permissive) · fc2a2c4d5dc6bf94 · report
build_rotary_matrix brotherhappy/ostquant/quant/quant_layer.py official repository unverified Apache-2.0 (permissive) · 949dbfa8a6a1c081 · report
get_c4_new brotherhappy/ostquant/utils/data_utils.py official repository unverified Apache-2.0 (permissive) · bf483c41f2ae82ca · report
get_layers brotherhappy/ostquant/utils/model_utils.py official repository unverified Apache-2.0 (permissive) · 402d788d51ddf8ca · report
get_param_keys brotherhappy/ostquant/quant/ost_train.py official repository unverified Apache-2.0 (permissive) · 43e8256475d7bb9b · report
get_ptb_new brotherhappy/ostquant/utils/data_utils.py official repository unverified Apache-2.0 (permissive) · ba768d9ba463a634 · report
get_rope_function_name brotherhappy/ostquant/utils/model_utils.py official repository unverified Apache-2.0 (permissive) · 0610a2ba9d8dcbf9 · report
get_wikitext2 brotherhappy/ostquant/utils/data_utils.py official repository unverified Apache-2.0 (permissive) · 443e801197c1a259 · report
model_type_extractor brotherhappy/ostquant/utils/model_utils.py official repository unverified Apache-2.0 (permissive) · 835d4747f8b50492 · report
qr_retraction brotherhappy/ostquant/quant/cayley_opt.py official repository unverified Apache-2.0 (permissive) · df9bd46776715121 · report
round_ste brotherhappy/ostquant/quant/quantizer.py official repository unverified Apache-2.0 (permissive) · 7f3de8a175cf4839 · report
unit brotherhappy/ostquant/quant/cayley_opt.py official repository unverified Apache-2.0 (permissive) · 9afd799fdddd5d33 · report

Tasks

Language ModelingLanguage ModellingLarge Language ModelQuantization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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