{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/zeroq-a-novel-zero-shot-quantization","title":"ZeroQ: A Novel Zero Shot Quantization Framework","arxiv_id":"2001.00281","date":"2020-01-01","proceeding":"CVPR 2020 6","authors":["Yaohui Cai","Zhewei Yao","Zhen Dong","Amir Gholami","Michael W. Mahoney","Kurt Keutzer"],"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}.","url_abs":"https://arxiv.org/abs/2001.00281v1","url_pdf":"https://arxiv.org/pdf/2001.00281v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"zeroq-a-novel-zero-shot-quantization","repo_url":"https://github.com/amirgholami/ZeroQ","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"zeroq-a-novel-zero-shot-quantization","repo_url":"https://github.com/jakc4103/DFQ","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"zeroq-a-novel-zero-shot-quantization","repo_url":"https://github.com/ricky40403/GDFQ","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"data-free-quantization","task_name":"Data Free Quantization"},{"task_slug":"model-compression","task_name":"Model Compression"},{"task_slug":"neural-network-compression","task_name":"Neural Network Compression"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"auxiliary-classifier","method_name":"Auxiliary Classifier"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"channel-shuffle","method_name":"Channel Shuffle"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"depthwise-convolution","method_name":"Depthwise Convolution"},{"method_slug":"depthwise-separable-convolution","method_name":"Depthwise Separable Convolution"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"groupwise-point-convolution","method_name":"Groupwise Point Convolution"},{"method_slug":"inception-v3","method_name":"Inception-v3"},{"method_slug":"inception-v3-module","method_name":"Inception-v3 Module"},{"method_slug":"inverted-residual-block","method_name":"Inverted Residual Block"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"pointwise-convolution","method_name":"Pointwise Convolution"},{"method_slug":"rmsprop","method_name":"RMSProp"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"shufflenet","method_name":"ShuffleNet"},{"method_slug":"shufflenet-block","method_name":"ShuffleNet Block"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/data-free-quantization-on-cifar10","task":"Data Free Quantization","dataset":"CIFAR10","model":"ResNet-20 CIFAR10","rank_in_archive_order":3,"of":3,"metrics":{"CIFAR-10 W8A8 Top-1 Accuracy":"93.94"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2001.00281","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2001.00281"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jakc4103/DFQ","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/amirgholami/ZeroQ","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ricky40403/GDFQ","reach":null}],"summary":{"ran_draft_wrong":3,"ran_honours":1,"unverified":15},"by_repo_kind":{"listed":{"samples":19,"ran":4,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"a0131fb70c267a9e","entry":"conv_1x1_bn","repo":"jakc4103/DFQ","repo_kind":"listed","path":"modeling/classification/MobileNetV2.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/modeling/classification/MobileNetV2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0131fb70c267a9e"}},{"code_sha256_prefix":"e087cbfa1e53486d","entry":"conv_bn","repo":"jakc4103/DFQ","repo_kind":"listed","path":"modeling/classification/MobileNetV2.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/modeling/classification/MobileNetV2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e087cbfa1e53486d"}},{"code_sha256_prefix":"1b2736c7aa8cd37f","entry":"group_annotation_by_class","repo":"jakc4103/DFQ","repo_kind":"listed","path":"main_ssd.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/main_ssd.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b2736c7aa8cd37f"}},{"code_sha256_prefix":"63ec083689f80f47","entry":"make_divisible","repo":"jakc4103/DFQ","repo_kind":"listed","path":"modeling/classification/MobileNetV2.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/modeling/classification/MobileNetV2.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"63ec083689f80f47"}},{"code_sha256_prefix":"7c52bc4a936af24d","entry":"F_interpolate","repo":"jakc4103/DFQ","repo_kind":"listed","path":"utils/layer_transform.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/utils/layer_transform.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7c52bc4a936af24d"}},{"code_sha256_prefix":"684a2e5289bf745a","entry":"bias_absorption","repo":"jakc4103/DFQ","repo_kind":"listed","path":"dfq.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/dfq.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"684a2e5289bf745a"}},{"code_sha256_prefix":"2d0fb158879cdb79","entry":"freeze_act","repo":"ricky40403/GDFQ","repo_kind":"listed","path":"utils/quantize_model.py","file_url":"https://github.com/ricky40403/GDFQ/blob/HEAD/utils/quantize_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2d0fb158879cdb79"}},{"code_sha256_prefix":"fd76c5681f61e04a","entry":"freeze_model","repo":"jakc4103/DFQ","repo_kind":"listed","path":"ZeroQ/utils/quantize_model.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/ZeroQ/utils/quantize_model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd76c5681f61e04a"}},{"code_sha256_prefix":"124d866697dbcc6d","entry":"getDistilData","repo":"jakc4103/DFQ","repo_kind":"listed","path":"ZeroQ/distill_data.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/ZeroQ/distill_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"124d866697dbcc6d"}},{"code_sha256_prefix":"67b637e812abb57e","entry":"getReconData","repo":"jakc4103/DFQ","repo_kind":"listed","path":"ZeroQ/reconstruct_data.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/ZeroQ/reconstruct_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67b637e812abb57e"}},{"code_sha256_prefix":"af3b154eb4651990","entry":"inference_all","repo":"jakc4103/DFQ","repo_kind":"listed","path":"main_cls.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/main_cls.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af3b154eb4651990"}},{"code_sha256_prefix":"d4613471df340857","entry":"kl_categorical","repo":"jakc4103/DFQ","repo_kind":"listed","path":"improve_dfq.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/improve_dfq.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d4613471df340857"}},{"code_sha256_prefix":"1392852bee3f1e32","entry":"norm2","repo":"jakc4103/DFQ","repo_kind":"listed","path":"improve_dfq.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/improve_dfq.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1392852bee3f1e32"}},{"code_sha256_prefix":"9a031a3d8db6ad9f","entry":"own_loss","repo":"jakc4103/DFQ","repo_kind":"listed","path":"ZeroQ/distill_data.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/ZeroQ/distill_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9a031a3d8db6ad9f"}},{"code_sha256_prefix":"2bd35b3a888d928d","entry":"quantize_model","repo":"ricky40403/GDFQ","repo_kind":"listed","path":"utils/quantize_model.py","file_url":"https://github.com/ricky40403/GDFQ/blob/HEAD/utils/quantize_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2bd35b3a888d928d"}},{"code_sha256_prefix":"903f76ab6e68b9f9","entry":"quantize_model","repo":"jakc4103/DFQ","repo_kind":"listed","path":"ZeroQ/utils/quantize_model.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/ZeroQ/utils/quantize_model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"903f76ab6e68b9f9"}},{"code_sha256_prefix":"65d3bcff8398fcb5","entry":"torch_cat","repo":"jakc4103/DFQ","repo_kind":"listed","path":"utils/layer_transform.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/utils/layer_transform.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"65d3bcff8398fcb5"}},{"code_sha256_prefix":"52f473532c7626da","entry":"torch_mean","repo":"jakc4103/DFQ","repo_kind":"listed","path":"utils/layer_transform.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/utils/layer_transform.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"52f473532c7626da"}},{"code_sha256_prefix":"c488fde89bf62be5","entry":"unfreeze_model","repo":"jakc4103/DFQ","repo_kind":"listed","path":"ZeroQ/utils/quantize_model.py","file_url":"https://github.com/jakc4103/DFQ/blob/HEAD/ZeroQ/utils/quantize_model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c488fde89bf62be5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}