SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.10032 · ICLR · 2025

LeanQuant: Accurate and Scalable Large Language Model Quantization with Loss-error-aware Grid

Tianyi Zhang, Anshumali Shrivastava

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2407.10032.json · badge: /api/ran/2407.10032.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
LeanModels/LeanQuant canonical (classifier label)
classifier basis: census
3 ran · 4 no recorded run
FunctionStatusWhere it lives
find_layers Ran
ran; our contract draft was wrong, not the code
LeanModels/LeanQuant/modelutils.py
pointer only (licence: NONE); the stored copy get_code serves, from squeezeailab/kvquant, is pointer only (licence: NONE) · get_code("a9e7f2cdf016b88b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeanModels/LeanQuant when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_ptb Ran
ran; our contract draft was wrong, not the code
LeanModels/LeanQuant/datautils.py
pointer only (licence: NONE) · get_code("f810b1ddd55b5375")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeanModels/LeanQuant when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

quantize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LeanModels/LeanQuant/quant.py
pointer only (licence: NONE) · get_code("41c57e55d21c4d96")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeanModels/LeanQuant when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_c4 Not yet run
unverified (harvested, no recorded run)
LeanModels/LeanQuant/datautils.py
pointer only (licence: NONE) · get_code("86ac8f1de9c0550b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeanModels/LeanQuant when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_llama Not yet run
unverified (harvested, no recorded run)
LeanModels/LeanQuant/llama.py
pointer only (licence: NONE) · get_code("9c16d58cb9509ae5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeanModels/LeanQuant when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_wikitext2 Not yet run
unverified (harvested, no recorded run)
LeanModels/LeanQuant/datautils.py
pointer only (licence: NONE) · get_code("3bbe14523c98ed57")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeanModels/LeanQuant when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

kmeans_fit Not yet run
unverified (harvested, no recorded run)
LeanModels/LeanQuant/lean_quantizer.py
pointer only (licence: NONE) · get_code("340b2f9ae0efeee0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeanModels/LeanQuant when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
find_layers 27 other papers
18 dated earlier, 7 later, 1 same year, order not determinable, 1 undated
2203.13474 (2022-03)
CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
2023.emnlp-main.892 (2023 (year only))
Z-FOLD: A Frustratingly Easy Post-Training Quantization Scheme for LLMs
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 24 more not named here
quantize 9 other papers
6 dated earlier, 2 later, 1 undated · 1 only as an assembly brick
2210.17323 (2022-10)
GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers
2023.emnlp-main.892 (2023 (year only))
Z-FOLD: A Frustratingly Easy Post-Training Quantization Scheme for LLMs
2312.05215 (2023-12)
DeltaZip: Efficient Serving of Multiple Full-Model-Tuned LLMs
and 6 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) have shown immense potential across various domains, but their high memory requirements and inference costs remain critical challenges for deployment. Post-training quantization (PTQ) has emerged as a promising technique to reduce memory requirements and decoding latency. However, recent accurate quantization methods often depend on specialized computations or custom data formats to achieve better model quality, which limits their compatibility with popular frameworks, as they require dedicated inference kernels tailored to specific hardware and software platforms, hindering wider adoption. Furthermore, many competitive methods have high resource requirements and computational overhead for quantizing models, making it challenging to scale them to hundreds of billions of parameters. In response to these challenges, we propose LeanQuant (Loss-error-aware network Quantization), a novel quantization method that is accurate, versatile, and scalable. In the existing popular iterative loss-error-based quantization framework, we identify a critical limitation in prior methods: the min-max affine quantization grid fails to preserve model quality due to outliers in inverse Hessian diagonals. To overcome this fundamental issue, we propose learning loss-error-aware grids, instead of using non-adaptive min-max affine grids. Our approach not only produces quantized models that are more accurate but also generalizes to a wider range of quantization types, including affine and non-uniform quantization, enhancing compatibility with more frameworks. Extensive experiments with recent LLMs demonstrate that LeanQuant is highly accurate, comparing favorably against competitive baselines in model quality, and scalable, achieving very accurate quantization of Llama-3.1 405B, one of the largest open-source LLMs to date, using two Quadro RTX 8000-48GB GPUs in 21 hours. Our code is available at https://github.com/LeanModels/LeanQuant.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2407.10032")
get_code_for_paper("2407.10032")
have("2407.10032")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2407.10032.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2407.10032.svg)](https://syntology.ai/paper/2407.10032)

Connect an agent — have() is free.