Papers › Pushing the Limits of Large Language Model Quantization via the Linearity Theorem

Pushing the Limits of Large Language Model Quantization via the Linearity Theorem

26 Nov 2024arXiv:2411.17525archive 2025-07-28

Vladimir Malinovskii, Andrei Panferov, Ivan Ilin, Han Guo, Peter Richtárik, Dan Alistarh

Quantizing large language models has become a standard way to reduce their memory and computational costs. Typically, existing methods focus on breaking down the problem into individual layer-wise sub-problems, and minimizing per-layer error, measured via various metrics. Yet, this approach currently lacks theoretical justification and the metrics employed may be sub-optimal. In this paper, we present a "linearity theorem" establishing a direct relationship between the layer-wise ℓ₂ reconstruction error and the model perplexity increase due to quantization. This insight enables two novel applications: (1) a simple data-free LLM quantization method using Hadamard rotations and MSE-optimal grids, dubbed HIGGS, which outperforms all prior data-free approaches such as the extremely popular NF4 quantized format, and (2) an optimal solution to the problem of finding non-uniform per-layer quantization levels which match a given compression constraint in the medium-bitwidth regime, obtained by reduction to dynamic programming. On the practical side, we demonstrate improved accuracy-compression trade-offs on Llama-3.1 and 3.2-family models, as well as on Qwen-family models. Further, we show that our method can be efficiently supported in terms of GPU kernels at various batch sizes, advancing both data-free and non-uniform quantization for LLMs.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 36 code samples harvested from 2 repositories linked to this paper: 21 ran (of which 0 constructed an object rather than computing a result; 20 with no instrument failure: 0 honoured, 1 violated, 19 with no contract checked; 1 where Syntology's instrument failed) · 15 unverified. Where Syntology's instrument failed: 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 36 samples from 2 repositories, 21 ran (20 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-27 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

goodevening13/aquakv mentioned on GitHubpytorchApache-2.0Syntology: 23 samples, 13 ran (0 instrument-failed) · 10 unverified report
hanguo97/flute mentioned on GitHubjaxApache-2.0Syntology: 13 samples, 8 ran (1 instrument-failed) · 5 unverified 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

36 samples harvested: 21 ran (of which 0 constructed an object rather than computing a result; 20 with no instrument failure: 0 honoured, 1 violated, 19 with no contract checked; 1 where Syntology's instrument failed) · 15 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · violated contract
1ran; the contract check could not run
19ran
15unverified

Licence: 1 of the 36 samples is pointer only, meaning Syntology does not serve that copy's text. For that sample, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. 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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

goodevening13/aquakv community (archive-listed) 23 samples, 13 ran (0 instrument-failed) · 10 unverified
apply_rotary_to_keys aquakv/cache_utils.py ran Apache-2.0 (permissive) · 29d977b676b52dd7 · report fixture: signature key_states:Tensor/4/float, cos:Tensor/4/float, sin:Tensor/4/float · returned Tensor · level recorded 2026-09-25
build_chat in 29 papers evaluate_longbench.py ran Apache-2.0 (permissive) · c3b06c2ebcf2af2d · report fixture: signature tokenizer:MockTokenizer/0/?, prompt:str/0/str, model_name:str/0/str · returned dict · level recorded 2026-09-25
combine_heads in 6 papers aquakv/cache_utils.py ran fingerprinted Apache-2.0 (permissive) · 5b7154a0c5684311 · report fixture: signature key_states:Tensor/4/float · returned Tensor · level recorded 2026-09-24
compute_centers_of_mass_with_gaussian_weights aquakv/grid_generator.py ran fingerprinted Apache-2.0 (permissive) · 9d136789dc29ba63 · report fixture: signature grid:Tensor/2/float, sampled_points:Tensor/2/float · returned tuple · level recorded 2026-09-24
compute_relative_mse train_predictors.py ran Apache-2.0 (permissive) · 6961cac72fc0f302 · report fixture: signature predictor:callable/0/?, X:Tensor/2/float, Y:Tensor/2/float, chunk_size:int/0/int, compute_device:device/0/?, compute_dtype:dtype/0/? · returned float · level recorded 2026-09-24
entropy in 112 papers
census: 22 implementations from 25 papers, 16 distinct outputs across 4 buckets, one shared input per bucket
aquakv/edenn.py ran Apache-2.0 (permissive) · 0e7f23886f4a1549 · report fixture: signature idx:Tensor/1/int · returned float · level recorded 2026-09-24
fit_linear_regression aquakv/linear_utils.py ran Apache-2.0 (permissive) · ce15ccccdf94984a · report fixture: signature X:Tensor/2/float, Y:Tensor/2/float, reg_rate:float/0/float, fit_intercept:bool/0/bool, compute_device:NoneType/0/?, compute_dtype:dtype/0/?, chunk_size:NoneType/0/?, verbose:bool/0/bool · returned tuple · level recorded 2026-09-24
get_gamma in 7 papers aquakv/grid_generator.py ran Apache-2.0 (permissive) · 10865357dbe212e1 · report fixture: signature n:int/0/int, GAMMA_0:float/0/float, A:float/0/float, B:float/0/float · returned float · level recorded 2026-09-24
get_layers in 20 papers aquakv/modelutils.py ran Apache-2.0 (permissive) · 6af39b9342e5f24f · report fixture: signature model:callable/0/? · returned ModuleList · level recorded 2026-09-24
post_process in 56 papers evaluate_longbench.py ran · violated contract fingerprinted Apache-2.0 (permissive) · 4489113b536ca6eb · report fixture: signature response:str/0/str, model_name:str/0/str · returned str · level recorded 2026-09-22
reduced_rank_regression aquakv/linear_utils.py ran Apache-2.0 (permissive) · 175e3e1a5d9a01c2 · report fixture: signature X:Tensor/2/float, Y:Tensor/2/float, rank:int/0/int, reg_rate:float/0/float, svd_niter:int/0/int, fit_intercept:bool/0/bool, compute_device:device/0/?, compute_dtype:dtype/0/?, chunk_size:NoneType/0/? · returned tuple · level recorded 2026-09-24
sample_gaussian in 15 papers aquakv/grid_generator.py ran fingerprinted Apache-2.0 (permissive) · f5f502f02b4bc42d · report fixture: signature n_samples:int/0/int, dim:int/0/int · returned Tensor · level recorded 2026-09-24
split_heads in 10 papers aquakv/cache_utils.py ran fingerprinted Apache-2.0 (permissive) · 45d1e56d523d67f7 · report fixture: signature key_states:Tensor/3/float, head_dim:int/0/int · returned Tensor · level recorded 2026-09-24
convert_rrr_to_module aquakv/linear_utils.py unverified Apache-2.0 (permissive) · 8f5d43a58d5e35fd · report
evaluate_perplexity evaluate_perplexity.py unverified Apache-2.0 (permissive) · b8dbc365b7e02acf · report
get_grid in 24 papers aquakv/edenn.py unverified Apache-2.0 (permissive) · 43b836ca41904aad · report
get_grid_norms_squared aquakv/edenn.py unverified Apache-2.0 (permissive) · 8c89526526a53954 · report
get_inps aquakv/modelutils.py unverified Apache-2.0 (permissive) · 5779965330a56105 · report
get_ptb in 43 papers aquakv/datautils.py unverified Apache-2.0 (permissive) · 330e351424a2b37b · report
get_red_pajama aquakv/datautils.py unverified Apache-2.0 (permissive) here; the stored copy is pointer only · 6f93456246f10e4f · report
get_wikitext2 in 78 papers aquakv/datautils.py unverified Apache-2.0 (permissive) · e7d4ca6a631d3399 · report
parse_args in 355 papers evaluate_longbench.py unverified Apache-2.0 (permissive) · 8acc0555324217dc · report
update_outs_inplace_ aquakv/modelutils.py unverified Apache-2.0 (permissive) · 404c5dbba75966dd · report
hanguo97/flute community (archive-listed) 13 samples, 8 ran (1 instrument-failed) · 5 unverified
from_binary flute/packbits_utils.py ran Apache-2.0 (permissive) · 4e9c1bc486b3cb15 · report fixture: signature tensor:Tensor/2/bool, num_bits:int/0/int, legacy:bool/0/bool · returned Tensor · level recorded 2026-09-25
generate_nested_switch flute/codegen_utils.py ran Apache-2.0 (permissive) · 8e030cc1d6d4e357 · report fixture: signature names:list/1/str, cases:dict/0/?, constexprs:list/1/bool, prefix:str/0/str · returned str · level recorded 2026-09-25
get_parent flute/integrations/learnable.py ran Apache-2.0 (permissive) · 0449aa6e073b161d · report fixture: signature module:callable/0/?, name_split:list/1/str · returned LeafModule · level recorded 2026-09-25
get_values_pivots flute/nf_utils.py ran Apache-2.0 (permissive) · 415d1476002d7be7 · report fixture: signature bits:int/0/int, symmetric:bool/0/bool, dtype:dtype/0/? · returned tuple · level recorded 2026-09-25
linspace flute/nf_utils.py ran Apache-2.0 (permissive) · a9e13dbd57fe99fa · report fixture: returned Tensor · level recorded 2026-09-27
make_qmap2_from_qmap flute/utils.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · c9c2ebb7e3ef65d4 · report fixture: signature qmap:Tensor/1/float · returned Tensor · level recorded 2026-09-25
pack_bools_into_integers flute/packbits_utils.py ran Apache-2.0 (permissive) · af30cd35745c055e · report fixture: signature tensor:Tensor/1/bool, packed_dtype:dtype/0/?, legacy:bool/0/bool · returned tuple · level recorded 2026-09-25
to_binary in 7 papers flute/packbits_utils.py ran Apache-2.0 (permissive) · 2327775e49455531 · report fixture: signature tensor:Tensor/2/int, num_bits:int/0/int, legacy:bool/0/bool · returned Tensor · level recorded 2026-09-25
get_accelerate_hook flute/integrations/base.py unverified Apache-2.0 (permissive) · 1ca31572851e9670 · report
get_workspace_streamk flute/utils.py unverified Apache-2.0 (permissive) · f1e34f158c99562b · report
make_workspace_streamk flute/utils.py unverified Apache-2.0 (permissive) · d148bebf6417581d · report
manual_nf4 flute/nf_utils.py unverified Apache-2.0 (permissive) · 6972df470f34c81b · report
replace_with_flute_linear flute/integrations/huggingface.py unverified Apache-2.0 (permissive) · 5578730b99e18dce · report

Tasks

Language ModelingLanguage ModellingLarge Language ModelQuantization

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

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