SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.17066 · EMNLP · 2024

VPTQ: Extreme Low-bit Vector Post-Training Quantization for Large Language Models

Zhang, Mao Yang, Yang Wang, Cheng Li, Lyna Li, Yifei Liu, Ting Cao, Shengyu Ye, Jicheng Wen

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 4 failures of our instrument; 2 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/2409.17066.json · badge: /api/ran/2409.17066.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
microsoft/vptq canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
microsoft/VPTQ community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
VQuantLinear Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/VPTQ/vptq/layers/vqlinear.py
code served (permissive licence) · get_code("7c69c21f0134f3b7")
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 an instance of its own class, VQuantLinear: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import math

torch.manual_seed(0)

ARGS = {
    'in_features': 16,
    'out_features': 32,
    'vector_lens': (2, 4),
    'num_centroids': (8, 16),
    'num_res_centroids': (-1, -1),
    'group_num': 4,
    'group_size': 8,
    'outlier_size': 2,
    'indices_as_float': False,
    'enable_norm': False,
    'enable_perm': False,
    'is_indice_packed': False,
    'bias': False,
    'vector_quant_dim': 'out',
    'device': None,
    'dtype': None,
    'enable_proxy_error': True,
}
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 VQuantLinear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VQuantLinear 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
dtype_convert Ran
ran; our contract draft was wrong, not the code
microsoft/vptq/vptq/utils/pack.py
code served (permissive licence) · get_code("3ead5607a7895cfd")
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 torch.nn as nn

torch.manual_seed(0)

# The function performs:
# 1. data.view(from_dtype) - reinterprets tensor as from_dtype
# 2. .to(to_dtype) - converts to target dtype
# 3. .view(as_type) - reinterprets as final dtype

# We need a tensor that can be viewed/converted between dtypes
# Create a small tensor with float32, convert to another dtype
data = torch.randn(2, 4, dtype=torch.float32)

# from_dtype: the dtype we're viewing the data as initially
from_dtype = torch.float32

# to_dtype: the target dtype after conversion
to_dtype = torch.float64

# as_type: the final dtype to view the result as
as_type = torch.float64

ARGS = {
    "data": data,
    "from_dtype": from_dtype,
    "to_dtype": to_dtype,
    "as_type": as_type,
}
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
find_layers Ran
ran; our contract draft was wrong, not the code
microsoft/vptq/vptq/layers/utils.py
code served (permissive licence) · get_code("6886c53e21133de1")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a simple neural network module with nested structure
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        self.submodule = nn.Sequential(
            nn.Linear(2, 5),
            nn.ReLU(),
            nn.Linear(5, 1)
        )
    
    def forward(self, x):
        return x

module = SimpleNet()

ARGS = {
    'module': module,
    'layers': [nn.Linear],
    'name': ''
}
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
get_valid_args Ran
ran; our contract draft was wrong, not the code
microsoft/vptq/vptq/app_utils.py
code served (permissive licence) · get_code("c091738c46a0359c")
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 Namespace. 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 argparse
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal argument parser
parser = argparse.ArgumentParser()
parser.add_argument('--learning_rate', type=float, default=0.001)
parser.add_argument('--batch_size', type=int, default=32)
parser.add_argument('--epochs', type=int, default=10)
parser.add_argument('--model_name', type=str, default='test_model')

ARGS = {
    'parser': parser
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
pack_index Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/vptq/vptq/utils/pack.py
code served (permissive licence) · get_code("7b26a1643bf85c76")
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 int, shape (1, 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)

# Create small tensors for testing pack_index
# indice: shape (2, 4) with values that fit in index_bits
indice = torch.tensor([[1, 2, 3, 4], [5, 6, 7, 8]], dtype=torch.uint16)

# res_indice: shape (2, 4) with values that fit in res_bits
res_indice = torch.tensor([[0, 1, 0, 1], [1, 0, 1, 0]], dtype=torch.uint16)

# index_bits: number of bits to use for main indices
index_bits = 8

# res_bits: number of bits to use for residual indices
res_bits = 8

# index_dtype: data type for indices
index_dtype = torch.uint16

# as_dtype: output data type
as_dtype = torch.int32

ARGS = {
    "indice": indice,
    "index_bits": index_bits,
    "res_indice": res_indice,
    "res_bits": res_bits,
    "index_dtype": index_dtype,
    "as_dtype": as_dtype,
}
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 int, shape (1, 2, 2) — shape (1, 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
quant_gemv_v2 Not yet run
unverified (harvested, no recorded run)
microsoft/vptq/vptq/ops/quant_gemm.py
code served (permissive licence) · get_code("7a5efa2ff4cb33e3")
How it ran

no invocation recorded.

unpack_index_tensor Not yet run
unverified (harvested, no recorded run)
microsoft/vptq/vptq/utils/pack.py
code served (permissive licence) · get_code("6b289a9c0a55476e")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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.

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

Scaling model size significantly challenges the deployment and inference of Large Language Models (LLMs). Due to the redundancy in LLM weights, recent research has focused on pushing weight-only quantization to extremely low-bit (even down to 2 bits). It reduces memory requirements, optimizes storage costs, and decreases memory bandwidth needs during inference. However, due to numerical representation limitations, traditional scalar-based weight quantization struggles to achieve such extreme low-bit. Recent research on Vector Quantization (VQ) for LLMs has demonstrated the potential for extremely low-bit model quantization by compressing vectors into indices using lookup tables.

For agents

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

get_harvested_code_for_paper("2409.17066")
get_code_for_paper("2409.17066")
have("2409.17066")

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

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

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

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

Connect an agent — have() is free.