SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.05003 · 2025

QuEST: Stable Training of LLMs with 1-Bit Weights and Activations

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 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 1 has no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2502.05003.json · badge: /api/ran/2502.05003.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
IST-DASLab/QuEST canonical (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
FunctionStatusWhere it lives
dequantize_dense Ran
ran on a synthesized input
IST-DASLab/QuEST/src/eval_hswag.py
code served (permissive licence) · get_code("1a5c585a2c27ed6f")
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 2, dtype family float, shape (2, 4) 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
import numpy as np

torch.manual_seed(0)

# Construct arguments for dequantize_dense(xq, scale, step)
# The function performs: xq * step - scale
# All three parameters should be tensors or scalars that support multiplication and subtraction

xq = torch.randn(2, 4)  # quantized values, shape (2, 4)
scale = torch.randn(2, 4)  # scale factor, same shape as xq
step = torch.randn(2, 4)  # step size, same shape as xq

ARGS = {
    "xq": xq,
    "scale": scale,
    "step": step,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
move_to_cpu Ran
ran; our contract draft was wrong, not the code
IST-DASLab/QuEST/src/logger/logger.py
code served (permissive licence) · get_code("1bd86a911c3f78a3")
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 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.

import copy
import torch

torch.manual_seed(0)

# Create test data structures with tensors on CPU
tensor_on_cpu = torch.randn(2, 4)
nested_dict = {
    'a': torch.randn(2, 3),
    'b': {
        'c': torch.randn(2, 4, 5),
        'd': 42
    }
}
nested_list = [
    torch.randn(2, 4),
    [torch.randn(3, 4), 'string'],
    {'key': torch.randn(2, 2)}
]
nested_tuple = (
    torch.randn(2, 4),
    (torch.randn(3, 2), 100),
    {'nested': torch.randn(2, 3)}
)
mixed_structure = {
    'tensors': [torch.randn(2, 4), torch.randn(3, 4)],
    'scalars': [1, 2.5, 'test'],
    'nested': (torch.randn(2, 2), {'inner': torch.randn(4, 3)})
}

ARGS = {
    'data': mixed_structure,
    'clone': False
}
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 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
precompute_freqs_cis Ran
ran, honoured the contract we drafted
IST-DASLab/QuEST/src/models/llama.py
code served (permissive licence) · get_code("a1d6f89d43fc42e1")
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 3, dtype family float, shape (2, 2, 2) 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

torch.manual_seed(0)

ARGS = {
    "dim": 4,
    "end": 2,
    "theta": 10000.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 3, dtype family float, shape (2, 2, 2) — shape (2, 2, 2) 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
self_preserving_overwrite Ran
ran; our contract draft was wrong, not the code
IST-DASLab/QuEST/src/logger/logger.py
code served (permissive licence) · get_code("198aea734522a443")
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 function. 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.

import torch
import torch.nn as nn
from functools import wraps

def self_preserving_overwrite(method):

    @wraps(method)
    def _impl(inner_self, *args, **kwargs):
        return method(*args, **kwargs)
    return _impl


# Create a simple test method
def test_method(*args, **kwargs):
    return "test_result"


# ARGS must map every parameter of self_preserving_overwrite to a value
# The only parameter is 'method', which should be a callable
ARGS = {
    "method": test_method
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
apply_rotary_emb Not yet run
unverified (harvested, no recorded run)
IST-DASLab/QuEST/src/models/llama.py
code served (permissive licence) · get_code("41b98aa1d9397844")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
IST-DASLab/QuEST/src/models/utils.py
code served (permissive licence) · get_code("843859340885ab12")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 2 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
precompute_freqs_cis 6 other papers
1 dated earlier, 5 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
2602.02016 (2026-02)
DASH: Faster Shampoo via Batched Block Preconditioning and Efficient Inverse-Root Solvers
and 3 more not named here
move_to_cpu 5 other papers
1 dated earlier, 4 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
2602.02016 (2026-02)
DASH: Faster Shampoo via Batched Block Preconditioning and Efficient Inverse-Root Solvers
and 2 more not named here
self_preserving_overwrite 5 other papers
1 dated earlier, 4 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
2602.02016 (2026-02)
DASH: Faster Shampoo via Batched Block Preconditioning and Efficient Inverse-Root Solvers
and 2 more not named here
get_model 2 other papers
1 dated earlier, 1 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2602.02016 (2026-02)
DASH: Faster Shampoo via Batched Block Preconditioning and Efficient Inverse-Root Solvers

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-23.

Repositories linked to this paper

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

Abstract

One approach to reducing the massive costs of large language models (LLMs) is the use of quantized or sparse representations for training or deployment. While post-training compression methods are very popular, the question of obtaining even more accurate compressed models by directly training over such representations, i.e., Quantization-Aware Training (QAT), is still open: for example, a recent study (arXiv:2411.04330) put the "optimal" bit-width at which models can be trained using QAT, while staying accuracy-competitive with standard FP16/BF16 precision, at 8-bits weights and activations. We advance this state-of-the-art via a new method called QuEST, for which we demonstrate optimality at 4-bits and stable convergence as low as 1-bit weights and activations. QuEST achieves this by improving two key aspects of QAT methods: (1) accurate and fast quantization of the (continuous) distributions of weights and activations via Hadamard normalization and MSE-optimal fitting; (2) a new trust gradient estimator based on the idea of explicitly minimizing the error between the noisy gradient computed over quantized states and the "true" (but unknown) full-precision gradient. Experiments on Llama-type architectures show that QuEST induces stable scaling laws across the entire range of hardware-supported precisions, and can be extended to sparse representations. We provide GPU kernel support showing that models produced by QuEST can be executed efficiently. Our code is available at https://github.com/IST-DASLab/QuEST.

For agents

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

get_harvested_code_for_paper("2502.05003")
get_code_for_paper("2502.05003")
have("2502.05003")

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

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

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

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

Connect an agent — have() is free.