SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.11062 · 2024

EfficientQAT: Efficient Quantization-Aware Training for Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

4 of 9 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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.11062.json · badge: /api/ran/2407.11062.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
opengvlab/efficientqat canonical (classifier label)
classifier basis: census
4 ran · 5 no recorded run
FunctionStatusWhere it lives
ampscaler_get_grad_norm Ran
ran, honoured the contract we drafted
opengvlab/efficientqat/utils.py
code served (permissive licence) · get_code("4ac3f836e543e81c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from math import inf

torch.manual_seed(0)

# Create a small neural network with parameters that have gradients
class SimpleModel(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = torch.nn.Linear(4, 3)
        self.linear2 = torch.nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear2(torch.relu(self.linear1(x)))

# Initialize model and compute gradients
model = SimpleModel()
x = torch.randn(2, 4)
y = torch.randn(2, 2)
loss = torch.nn.MSELoss()

output = model(x)
loss_val = loss(output, y)
loss_val.backward()

# Extract parameters with gradients
parameters = [p for p in model.parameters() if p.grad is not None]

# Test case 1: list of parameters with norm_type=2.0
ARGS = {
    "parameters": parameters,
    "norm_type": 2.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_logger Ran
ran; our contract draft was wrong, not the code
opengvlab/efficientqat/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Nkniexin/SFMP, is pointer only (licence: NONE) · get_code("87877d0c60858bff")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Nkniexin/SFMP, and GitHub detected no licence in that repository 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.

extract_alpaca_dataset Ran
ran; our contract draft was wrong, not the code
opengvlab/efficientqat/datautils_e2e.py
code served (permissive licence) · get_code("b5445674ab17410f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for extract_alpaca_dataset

ARGS = {
    'example': {
        'instruction': 'What is the capital of France?',
        'input': 'France is a country in Europe.',
        'output': 'The capital of France is Paris.'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_last_checkpoint Ran
ran; our contract draft was wrong, not the code
opengvlab/efficientqat/main_e2e_qp.py
code served (permissive licence) · get_code("89ce33341af66037")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create a checkpoint directory with some checkpoint subdirectories
checkpoint_dir = os.path.join(temp_dir, 'checkpoints')
os.makedirs(checkpoint_dir, exist_ok=True)

# Create some checkpoint directories
os.makedirs(os.path.join(checkpoint_dir, 'checkpoint-100'), exist_ok=True)
os.makedirs(os.path.join(checkpoint_dir, 'checkpoint-200'), exist_ok=True)
os.makedirs(os.path.join(checkpoint_dir, 'checkpoint-50'), exist_ok=True)

ARGS = {
    'checkpoint_dir': checkpoint_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_c4 Not yet run
unverified (harvested, no recorded run)
opengvlab/efficientqat/datautils_block.py
code served (permissive licence) · get_code("2d9448699cce6e63")
How it ran

no invocation recorded.

get_conv_template Not yet run
unverified (harvested, no recorded run)
opengvlab/efficientqat/deita_dataset/conversation.py
pointer only (licence: MIT); the stored copy get_code serves, from kaistAI/FLASK, is pointer only (licence: NONE) · get_code("a566c582d26ceb36")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from kaistAI/FLASK, and GitHub detected no licence in that repository 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_redpajama Not yet run
unverified (harvested, no recorded run)
opengvlab/efficientqat/datautils_block.py
code served (permissive licence) · get_code("d26c6656a23451bd")
How it ran

no invocation recorded.

get_wikitext2 Not yet run
unverified (harvested, no recorded run)
opengvlab/efficientqat/datautils_block.py
code served (permissive licence) · get_code("6d02281de8bfe304")
How it ran

no invocation recorded.

make_data_module Not yet run
unverified (harvested, no recorded run)
opengvlab/efficientqat/datautils_e2e.py
code served (permissive licence) · get_code("a05847ca43287c3f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 9 later) and 0 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
get_conv_template 69 other papers
37 dated earlier, 27 later, 4 same year, order not determinable, 1 undated
1911.03705 (2019-11)
CommonGen: A Constrained Text Generation Challenge for Generative Commonsense Reasoning
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2204.07705 (2022-04)
SUPER-NATURALINSTRUCTIONS: Generalization via Declarative Instructions on 1600+ NLP Tasks
and 66 more not named here
extract_alpaca_dataset 8 other papers
5 dated earlier, 3 later
2305.14314 (2023-05)
QLORA: Efficient Finetuning of Quantized LLMs
2305.16300 (2023-05)
Random-Access Infinite Context Length for Transformers
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 5 more not named here
create_logger 7 other papers
4 dated earlier, 3 later
2308.13137 (2023-08)
OmniQuant: Omnidirectionally Calibrated Quantization for Large Language Models
2401.09417 (2024-01)
Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model
2403.12544 (2024-03)
AffineQuant: Affine Transformation Quantization for Large Language Models
and 4 more not named here
get_last_checkpoint 5 other papers
4 dated earlier, 1 later
2305.14314 (2023-05)
QLORA: Efficient Finetuning of Quantized LLMs
2310.05910 (2023-10)
SALMON: Self-Alignment with Instructable Reward Models
2405.11165 (2024-05)
Automated Multi-level Preference for MLLMs
and 2 more not named here
ampscaler_get_grad_norm 2 other papers
1 dated earlier, 1 later
2403.12544 (2024-03)
AffineQuant: Affine Transformation Quantization for Large Language Models
2025.acl-long.498 (2025 (year only))
EfficientQAT: Efficient Quantization-Aware Training for Large Language Models
get_c4 1 other paper
1 later
2025.acl-long.498 (2025 (year only))
EfficientQAT: Efficient Quantization-Aware Training for Large Language Models
get_redpajama 1 other paper
1 later
2025.acl-long.498 (2025 (year only))
EfficientQAT: Efficient Quantization-Aware Training for Large Language Models
get_wikitext2 1 other paper
1 later
2025.acl-long.498 (2025 (year only))
EfficientQAT: Efficient Quantization-Aware Training for Large Language Models
make_data_module 1 other paper
1 later
2025.acl-long.498 (2025 (year only))
EfficientQAT: Efficient Quantization-Aware Training for Large Language Models

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) are crucial in modern natural language processing and artificial intelligence. However, they face challenges in managing their significant memory requirements. Although quantization-aware training (QAT) offers a solution by reducing memory consumption through low-bit representations with minimal accuracy loss, it is impractical due to substantial training resources. To address this, we propose Efficient Quantization-Aware Training (EfficientQAT), a more feasible QAT algorithm. EfficientQAT involves two consecutive phases: Block-wise training of all parameters (Block-AP) and end-to-end training of quantization parameters (E2E-QP). To the best of our knowledge, Block-AP is the first method to enable direct training of all parameters in a block-wise manner, reducing accuracy loss in low-bit scenarios by enhancing the solution space during optimization. E2E-QP then trains only the quantization parameters (step sizes) end-to-end, further improving the performance of quantized models by considering interactions among all sub-modules. Extensive experiments demonstrate that EfficientQAT outperforms previous quantization methods across a range of models, including base LLMs, instruction-tuned LLMs, and multimodal LLMs, with scales from 7B to 70B parameters at various quantization bits. For instance, EfficientQAT obtains a 2-bit Llama-2-70B model on a single A100-80GB GPU in 41 hours, with less than 3 points accuracy degradation compared to the full precision (69.48 vs. 72.41). Code is available at https://github.com/OpenGVLab/EfficientQAT.

For agents

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

get_harvested_code_for_paper("2407.11062")
get_code_for_paper("2407.11062")
have("2407.11062")

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

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

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

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

Connect an agent — have() is free.