SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.05821 · 2023

ASVD: Activation-aware Singular Value Decomposition for Compressing Large Language Models

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-24; 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/2312.05821.json · badge: /api/ran/2312.05821.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
hahnyuan/asvd4llm canonical (classifier label)
classifier basis: census
3 ran · 4 no recorded run
FunctionStatusWhere it lives
evaluate_perplexity Ran
ran; our contract draft was wrong, not the code
hahnyuan/asvd4llm/evaluate_utils.py
code served (permissive licence) · get_code("65c7a547e405a20f")
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 float, 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
import torch.nn as nn

torch.manual_seed(0)

# Define a minimal model that satisfies the function's requirements
class MinimalLanguageModel(nn.Module):
    def __init__(self, vocab_size=10, hidden_size=4):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, hidden_size)
        self.lm_head = nn.Linear(hidden_size, vocab_size)
        self.device_attr = torch.device('cpu')
    
    @property
    def device(self):
        return self.device_attr
    
    def forward(self, input_ids):
        # input_ids shape: [batch, seq_len]
        x = self.embedding(input_ids)  # [batch, seq_len, hidden_size]
        logits = self.lm_head(x)  # [batch, seq_len, vocab_size]
        return (logits,)  # Return tuple as the function expects [0] indexing

# Create model
model = MinimalLanguageModel(vocab_size=10, hidden_size=4)
model.eval()

# Create dataset: [batch_size, sequence_length]
# batch_size=2, seq_len=5
dataset = torch.randint(0, 10, size=(2, 5), dtype=torch.long)

# Set limit to process only 2 samples
limit = 2

ARGS = {
    "model": model,
    "dataset": dataset,
    "limit": limit,
}
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 float, 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
find_layers Ran
ran; our contract draft was wrong, not the code
hahnyuan/asvd4llm/quantization.py
pointer only (licence: MIT); 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 (MIT), 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.

quantize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hahnyuan/asvd4llm/quantization.py
code served (permissive licence) · get_code("41c57e55d21c4d96")
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)

# Create a small tensor for x (batch_size=2, features=4)
x = torch.randn(2, 4)

# Create scalar scale parameter
scale = torch.tensor(0.1)

# Create scalar zero parameter
zero = torch.tensor(0.0)

# Create integer maxq parameter (positive value for normal quantization)
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
calib_sensitivity_stable_rank Not yet run
unverified (harvested, no recorded run)
hahnyuan/asvd4llm/sensitivity.py
code served (permissive licence) · get_code("a2263a0b5d8a86f2")
How it ran

no invocation recorded.

get_english_quote Not yet run
unverified (harvested, no recorded run)
hahnyuan/asvd4llm/datautils.py
code served (permissive licence) · get_code("1cbf0df5b5d26b2a")
How it ran

no invocation recorded.

get_redpajama_train Not yet run
unverified (harvested, no recorded run)
hahnyuan/asvd4llm/datautils.py
code served (permissive licence) · get_code("783b484325d75ee8")
How it ran

no invocation recorded.

sample_train_loaders Not yet run
unverified (harvested, no recorded run)
hahnyuan/asvd4llm/datautils.py
code served (permissive licence) · get_code("24c1cdae1808e107")
How it ran

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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 2 later) and 3 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
6 dated earlier, 19 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
1 dated earlier, 1 the same month, 5 later, 1 same year, order not determinable, 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
get_english_quote 1 other paper
1 dated earlier
2310.00034 (2023-10)
PB-LLM: Partially Binarized Large Language Models
get_redpajama_train 1 other paper
1 dated earlier
2310.00034 (2023-10)
PB-LLM: Partially Binarized 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-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

In this paper, we introduce a new post-training compression paradigm for Large Language Models (LLMs) to facilitate their wider adoption. We delve into LLM weight low-rank decomposition, and find that the challenges of this task stem from (1) the distribution variance in the LLM activations and (2) the sensitivity difference among various kinds of layers. To address these issues, we propose a training-free approach called Activation-aware Singular Value Decomposition (ASVD). Specifically, ASVD manages activation outliers by transforming the weight matrix based on the activation distribution. This transformation allows the outliers in the activation matrix to be absorbed into the transformed weight matrix, thereby enhancing decomposition accuracy. Additionally, we propose an efficient iterative calibration process to optimize layer-specific decomposition by addressing the varying sensitivity of different LLM layers. In this way, ASVD can compress a network by 10%-30%. Based on the success of the low-rank decomposition of projection matrices in the self-attention module, we further introduce ASVD to compress the KV cache. By reducing the channel dimension of KV activations, memory requirements for KV cache can be largely reduced. ASVD can further achieve 50% KV cache reductions without performance drop in a training-free manner.

For agents

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

get_harvested_code_for_paper("2312.05821")
get_code_for_paper("2312.05821")
have("2312.05821")

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

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

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

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

Connect an agent — have() is free.