SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.findings-emnlp.1054 · EMNLP Findings · 2025

Beyond Fixed-Length Calibration for Post-Training Compression of LLMs

Jaehoon Oh, Dokwan Oh

Open in the Atlas

Code that ran

5 of 11 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; 5 failures of our instrument; 6 no recorded run), measured 2026-11-24; 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/2025.findings-emnlp.1054.json · badge: /api/ran/2025.findings-emnlp.1054.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/sparsegpt canonical (classifier label)
classifier basis: census
5 ran · 6 no recorded run
FunctionStatusWhere it lives
find_layers Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparsegpt/modelutils.py
pointer only (licence: Apache-2.0); 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: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from squeezeailab/kvquant, 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.

get_bloom Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparsegpt/bloom.py
code served (permissive licence) · get_code("cd666c16d4aaa66d")
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 MockBloomForCausalLM. 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
from unittest.mock import Mock, patch
import sys

torch.manual_seed(0)

# Mock the transformers library to avoid actual model downloads
class MockBloomForCausalLM:
    def __init__(self, *args, **kwargs):
        self.seqlen = None
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype=None):
        return cls()

# Create a mock module for transformers
mock_transformers = Mock()
mock_transformers.BloomForCausalLM = MockBloomForCausalLM

# Patch transformers before the function is called
sys.modules['transformers'] = mock_transformers

ARGS = {
    'model': 'bigscience/bloom-560m'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockBloomForCausalLM — a MockBloomForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockBloomForCausalLM 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_llama Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparsegpt/llama.py
code served (permissive licence) · get_code("88d590323ed219c8")
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 MockLlamaForCausalLM. 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
from unittest.mock import Mock, patch
import sys

torch.manual_seed(0)

# Create a mock LlamaForCausalLM class since we can't download the real model
class MockLlamaForCausalLM:
    def __init__(self, *args, **kwargs):
        self.seqlen = None
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype=None):
        return cls()

# Patch the transformers import to return our mock
mock_transformers = Mock()
mock_transformers.LlamaForCausalLM = MockLlamaForCausalLM
sys.modules['transformers'] = mock_transformers

# The function expects a model identifier string (HuggingFace model name)
# We'll pass a simple string identifier
ARGS = {
    'model': 'meta-llama/Llama-2-7b'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockLlamaForCausalLM — a MockLlamaForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockLlamaForCausalLM 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_opt Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparsegpt/opt.py
code served (permissive licence) · get_code("887f43fe08a6472d")
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 MockOPTForCausalLM. 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

torch.manual_seed(0)

# The function expects a model parameter that is a string (model name/path)
# However, since we can't actually download from HuggingFace, we need to mock
# the from_pretrained call. We'll create a minimal mock setup.

class MockConfig:
    def __init__(self):
        self.max_position_embeddings = 2048

class MockOPTForCausalLM(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = MockConfig()
        self.linear = nn.Linear(4, 4)
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype='auto'):
        return cls()

# Monkey patch the transformers module before the function runs
import sys
from types import ModuleType

mock_transformers = ModuleType('transformers')
mock_transformers.OPTForCausalLM = MockOPTForCausalLM
sys.modules['transformers'] = mock_transformers

# The model parameter should be a string (model identifier)
model_name = "facebook/opt-125m"

ARGS = {
    "model": model_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockOPTForCausalLM — a MockOPTForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockOPTForCausalLM 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
quantize Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparsegpt/quant.py
code served (permissive licence) · get_code("50ceff9d34d96d60")
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

torch.manual_seed(0)

# x: tensor to quantize
x = torch.randn(2, 4)

# scale: scaling factor (tensor or float)
scale = torch.tensor(0.1)

# zero: zero point offset
zero = torch.tensor(0, dtype=torch.long)

# maxq: maximum quantization level
maxq = 255

ARGS = {
    "x": x,
    "scale": scale,
    "zero": zero,
    "maxq": maxq,
}
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 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
bloom_sequential Not yet run
unverified (harvested, no recorded run)
IST-DASLab/sparsegpt/bloom.py
code served (permissive licence) · get_code("5076786563dd8499")
How it ran

no invocation recorded.

get_ptb Not yet run
unverified (harvested, no recorded run)
IST-DASLab/sparsegpt/datautils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Aaronhuang-778/MC-MoE, is pointer only (licence: NONE) · get_code("a7cbf4fc49c71e03")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Aaronhuang-778/MC-MoE, 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_tokenizer Not yet run
unverified (harvested, no recorded run)
IST-DASLab/sparsegpt/datautils.py
code served (permissive licence) · get_code("729f957048af4a3f")
How it ran

no invocation recorded.

get_wikitext2 Not yet run
unverified (harvested, no recorded run)
IST-DASLab/sparsegpt/datautils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Aaronhuang-778/MC-MoE, is pointer only (licence: NONE) · get_code("011909315dfdbc2e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Aaronhuang-778/MC-MoE, 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.

llama_sequential Not yet run
unverified (harvested, no recorded run)
IST-DASLab/sparsegpt/llama.py
code served (permissive licence) · get_code("8f1846e2ea49d19f")
How it ran

no invocation recorded.

opt_sequential Not yet run
unverified (harvested, no recorded run)
IST-DASLab/sparsegpt/opt.py
code served (permissive licence) · get_code("bf403ae47e912dc1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 1 later) and 1 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
23 dated earlier, 1 later, 2 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
get_ptb 7 other papers
6 dated earlier, 1 same year, order not determinable
2310.00034 (2023-10)
PB-LLM: Partially Binarized Large Language Models
2402.04291 (2024-02)
BiLLM: Pushing the Limit of Post-Training Quantization for LLMs
2402.17946 (2024-02)
SparseLLM: Towards Global Pruning of Pre-trained Language Models
and 4 more not named here
get_tokenizer 6 other papers
4 dated earlier, 2 same year, order not determinable
2310.00034 (2023-10)
PB-LLM: Partially Binarized Large Language Models
2402.04291 (2024-02)
BiLLM: Pushing the Limit of Post-Training Quantization for LLMs
2402.17946 (2024-02)
SparseLLM: Towards Global Pruning of Pre-trained Language Models
and 3 more not named here
get_wikitext2 6 other papers
5 dated earlier, 1 same year, order not determinable
2310.00034 (2023-10)
PB-LLM: Partially Binarized Large Language Models
2402.04291 (2024-02)
BiLLM: Pushing the Limit of Post-Training Quantization for LLMs
2402.17946 (2024-02)
SparseLLM: Towards Global Pruning of Pre-trained Language Models
and 3 more not named here
quantize 6 other papers
6 dated earlier
2307.15290 (2023-07)
ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation
2310.00034 (2023-10)
PB-LLM: Partially Binarized Large Language Models
2024.findings-naacl.145 (2024 (year only))
Role Prompting Guided Domain Adaptation with General Capability Preserve for Large Language Models
and 3 more not named here
get_bloom 5 other papers
5 dated earlier
2301.00774 (2023-01)
SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot
2307.15290 (2023-07)
ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation
2310.09499 (2023-10)
One-Shot Sensitivity-Aware Mixed Sparsity Pruning for Large Language Models
and 2 more not named here
get_llama 5 other papers
5 dated earlier
2307.15290 (2023-07)
ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation
2310.09499 (2023-10)
One-Shot Sensitivity-Aware Mixed Sparsity Pruning for Large Language Models
2024.findings-naacl.145 (2024 (year only))
Role Prompting Guided Domain Adaptation with General Capability Preserve for Large Language Models
and 2 more not named here
get_opt 5 other papers
5 dated earlier
2210.17323 (2022-10)
GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers
2301.00774 (2023-01)
SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot
2307.13304 (2023-07)
QuIP: 2-Bit Quantization of Large Language Models With Guarantees
and 2 more not named here
bloom_sequential 2 other papers
2 dated earlier
2301.00774 (2023-01)
SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot
2310.09499 (2023-10)
One-Shot Sensitivity-Aware Mixed Sparsity Pruning for Large Language Models
opt_sequential 1 other paper
1 dated earlier
2301.00774 (2023-01)
SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot

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

Repositories linked to this paper

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

Abstract

As large language models (LLMs) continue to grow in size, their practical deployment increasingly relies on a range of compression techniques, such as quantization, pruning, and lowrank approximation. Especially, post-training compression methods-which do not require re-training-have drawn considerable interest. Many recent methods leverage calibration data to capture magnitude or second-order characteristics of input activations. However, the role and significance of calibration data remain underexplored. In this study, we demonstrate that the sequence length of calibration data plays a crucial role in the effectiveness of post-training compression methods for LLMs. We then analyze input activations and find that, within the normalized hidden states, the embedding of the first token exhibits characteristics opposite to those of subsequent tokens. Building on this insight, we introduce state-aware length calibration, a technique that applies masking along the sequence axis, specifically targeting normalized hidden states. Experimental results show that our approach improves perplexity and zero-shot downstream tasks performance.

For agents

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

get_harvested_code_for_paper("2025.findings-emnlp.1054")
get_code_for_paper("2025.findings-emnlp.1054")
have("2025.findings-emnlp.1054")

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

curl https://syntology.ai/api/ran/2025.findings-emnlp.1054.json

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

[![Syntology run record](https://syntology.ai/api/ran/2025.findings-emnlp.1054.svg)](https://syntology.ai/paper/2025.findings-emnlp.1054)

Connect an agent — have() is free.