SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2001.00281 · 2020

ZeroQ: A Novel Zero Shot Quantization Framework

arXiv · PDF · Open in the Atlas

Code that ran

7 of 19 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 3 have no contract verdict; 3 failures of our instrument; 12 no recorded run), measured 2026-11-21; 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/2001.00281.json · badge: /api/ran/2001.00281.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
jakc4103/DFQ community (classifier label)
classifier basis not recorded on the link
7 ran · 10 no recorded run
ricky40403/GDFQ reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
FunctionStatusWhere it lives
conv_1x1_bn Ran
ran; our contract draft was wrong, not the code
jakc4103/DFQ/modeling/classification/MobileNetV2.py
pointer only (licence: MIT); the stored copy get_code serves, from zhoudaquan/rethinking_bottleneck_design, is pointer only (licence: NOASSERTION) · get_code("a0131fb70c267a9e")
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 zhoudaquan/rethinking_bottleneck_design, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

conv_bn Ran
ran; our contract draft was wrong, not the code
jakc4103/DFQ/modeling/classification/MobileNetV2.py
code served (permissive licence) · get_code("e087cbfa1e53486d")
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 Sequential. 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)

ARGS = {
    "inp": 3,
    "oup": 16,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
group_annotation_by_class Ran
ran; our contract draft was wrong, not the code
jakc4103/DFQ/main_ssd.py
code served (permissive licence) · get_code("1b2736c7aa8cd37f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 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 torch
import numpy as np

torch.manual_seed(0)

class MockDataset:
    def __init__(self):
        # Create a small mock dataset with 3 images
        self.annotations = [
            (
                "image_001",
                (
                    np.array([[10.0, 20.0, 30.0, 40.0], [15.0, 25.0, 35.0, 45.0]]),  # gt_boxes
                    np.array([1, 2]),  # classes
                    np.array([False, False])  # is_difficult
                )
            ),
            (
                "image_002",
                (
                    np.array([[5.0, 10.0, 15.0, 20.0]]),  # gt_boxes
                    np.array([1]),  # classes
                    np.array([True])  # is_difficult
                )
            ),
            (
                "image_003",
                (
                    np.array([[100.0, 110.0, 120.0, 130.0], [200.0, 210.0, 220.0, 230.0], [300.0, 310.0, 320.0, 330.0]]),  # gt_boxes
                    np.array([2, 1, 3]),  # classes
                    np.array([False, False, True])  # is_difficult
                )
            )
        ]
    
    def __len__(self):
        return len(self.annotations)
    
    def get_annotation(self, i):
        return self.annotations[i]

dataset = MockDataset()

ARGS = {
    'dataset': dataset
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
kl_categorical Ran
ran on a synthesized input
jakc4103/DFQ/improve_dfq.py
code served (permissive licence) · get_code("d4613471df340857")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create two logit tensors with distinct shapes for clarity
# Shape: (batch=2, logits=4)
p_logit = torch.randn(2, 4)
q_logit = torch.randn(2, 4)

ARGS = {
    "p_logit": p_logit,
    "q_logit": q_logit,
    "dim": -1,
}
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
make_divisible Ran
ran, honoured the contract we drafted
jakc4103/DFQ/modeling/classification/MobileNetV2.py
pointer only (licence: MIT); the stored copy get_code serves, from chris-boson/fashion_mnist, is pointer only (licence: NONE) · get_code("63ec083689f80f47")
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 chris-boson/fashion_mnist, 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.

norm2 Ran
ran on a synthesized input
jakc4103/DFQ/improve_dfq.py
code served (permissive licence) · get_code("1392852bee3f1e32")
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 torch.utils.tensorboard import SummaryWriter
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory for tensorboard logs
temp_dir = tempfile.mkdtemp()

# Create a SummaryWriter instance
writer = SummaryWriter(temp_dir)

# Create a small weight tensor (2x4)
weight = torch.randn(2, 4)

# Create an index string for logging
idx = "layer_0"

# Create a step counter
step = 0

ARGS = {
    "weight": weight,
    "idx": idx,
    "writer": writer,
    "step": step
}
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
own_loss Ran
ran on a synthesized input
jakc4103/DFQ/ZeroQ/distill_data.py
code served (permissive licence) · get_code("9a031a3d8db6ad9f")
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

torch.manual_seed(0)

# The function own_loss computes L-2 loss between two tensors A and B
# It calls:
# - A - B (subtraction)
# - .norm() (Frobenius norm)
# - ** 2 (exponentiation)
# - A.size(0) (get batch size)
#
# A and B should have the same shape, and both should be torch tensors
# with a batch dimension (size(0) is used as the normalizer)

A = torch.randn(2, 4)  # batch size 2, feature dim 4
B = torch.randn(2, 4)  # same shape as A

ARGS = {
    "A": A,
    "B": B,
}
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
F_interpolate Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/utils/layer_transform.py
code served (permissive licence) · get_code("7c52bc4a936af24d")
How it ran

no invocation recorded.

bias_absorption Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/dfq.py
code served (permissive licence) · get_code("684a2e5289bf745a")
How it ran

no invocation recorded.

freeze_act Not yet run
unverified (harvested, no recorded run)
ricky40403/GDFQ/utils/quantize_model.py
code served (permissive licence) · get_code("2d0fb158879cdb79")
How it ran

no invocation recorded.

freeze_model Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/ZeroQ/utils/quantize_model.py
code served (permissive licence) · get_code("fd76c5681f61e04a")
How it ran

no invocation recorded.

getDistilData Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/ZeroQ/distill_data.py
code served (permissive licence) · get_code("124d866697dbcc6d")
How it ran

no invocation recorded.

getReconData Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/ZeroQ/reconstruct_data.py
code served (permissive licence) · get_code("67b637e812abb57e")
How it ran

no invocation recorded.

inference_all Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/main_cls.py
code served (permissive licence) · get_code("af3b154eb4651990")
How it ran

no invocation recorded.

quantize_model Not yet run
unverified (harvested, no recorded run)
ricky40403/GDFQ/utils/quantize_model.py
code served (permissive licence) · get_code("2bd35b3a888d928d")
How it ran

no invocation recorded.

quantize_model Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/ZeroQ/utils/quantize_model.py
code served (permissive licence) · get_code("903f76ab6e68b9f9")
How it ran

no invocation recorded.

torch_cat Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/utils/layer_transform.py
code served (permissive licence) · get_code("65d3bcff8398fcb5")
How it ran

no invocation recorded.

torch_mean Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/utils/layer_transform.py
code served (permissive licence) · get_code("52f473532c7626da")
How it ran

no invocation recorded.

unfreeze_model Not yet run
unverified (harvested, no recorded run)
jakc4103/DFQ/ZeroQ/utils/quantize_model.py
code served (permissive licence) · get_code("c488fde89bf62be5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 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, 3 later) and 15 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
conv_1x1_bn 31 other papers
9 dated earlier, 21 later, 1 same year, order not determinable · 2 only as an assembly brick
1703.07402 (2017-03)
Simple Online and Realtime Tracking with a Deep Association Metric
1801.04381 (2018-01)
MobileNetV2: Inverted Residuals and Linear Bottlenecks
1811.08383 (2018-11)
TSM: Temporal Shift Module for Efficient Video Understanding
and 28 more not named here
conv_bn 18 other papers
7 dated earlier, 11 later · 1 only as an assembly brick
1611.06403 (2016-11)
Deep Outdoor Illumination Estimation
1703.07402 (2017-03)
Simple Online and Realtime Tracking with a Deep Association Metric
1801.04381 (2018-01)
MobileNetV2: Inverted Residuals and Linear Bottlenecks
and 15 more not named here
make_divisible 12 other papers
7 dated earlier, 1 the same month, 4 later · 1 only as an assembly brick
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1801.04381 (2018-01)
MobileNetV2: Inverted Residuals and Linear Bottlenecks
1811.08383 (2018-11)
TSM: Temporal Shift Module for Efficient Video Understanding
and 9 more not named here
group_annotation_by_class 1 other paper
1 dated earlier
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector

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

Repositories linked to this paper

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

Abstract

Quantization is a promising approach for reducing the inference time and memory footprint of neural networks. However, most existing quantization methods require access to the original training dataset for retraining during quantization. This is often not possible for applications with sensitive or proprietary data, e.g., due to privacy and security concerns. Existing zero-shot quantization methods use different heuristics to address this, but they result in poor performance, especially when quantizing to ultra-low precision. Here, we propose ZeroQ , a novel zero-shot quantization framework to address this. ZeroQ enables mixed-precision quantization without any access to the training or validation data. This is achieved by optimizing for a Distilled Dataset, which is engineered to match the statistics of batch normalization across different layers of the network. ZeroQ supports both uniform and mixed-precision quantization. For the latter, we introduce a novel Pareto frontier based method to automatically determine the mixed-precision bit setting for all layers, with no manual search involved. We extensively test our proposed method on a diverse set of models, including ResNet18/50/152, MobileNetV2, ShuffleNet, SqueezeNext, and InceptionV3 on ImageNet, as well as RetinaNet-ResNet50 on the Microsoft COCO dataset. In particular, we show that ZeroQ can achieve 1.71\% higher accuracy on MobileNetV2, as compared to the recently proposed DFQ method. Importantly, ZeroQ has a very low computational overhead, and it can finish the entire quantization process in less than 30s (0.5\% of one epoch training time of ResNet50 on ImageNet). We have open-sourced the ZeroQ framework\footnote{https://github.com/amirgholami/ZeroQ}.

For agents

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

get_harvested_code_for_paper("2001.00281")
get_code_for_paper("2001.00281")
have("2001.00281")

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

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

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

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

Connect an agent — have() is free.