{"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/qdrop-randomly-dropping-quantization-for-1","title":"QDrop: Randomly Dropping Quantization for Extremely Low-bit Post-Training Quantization","arxiv_id":"2203.05740","date":"2022-03-11","proceeding":null,"authors":["Xiuying Wei","Ruihao Gong","Yuhang Li","Xianglong Liu","Fengwei Yu"],"abstract":"Recently, post-training quantization (PTQ) has driven much attention to produce efficient neural networks without long-time retraining. Despite its low cost, current PTQ works tend to fail under the extremely low-bit setting. In this study, we pioneeringly confirm that properly incorporating activation quantization into the PTQ reconstruction benefits the final accuracy. To deeply understand the inherent reason, a theoretical framework is established, indicating that the flatness of the optimized low-bit model on calibration and test data is crucial. Based on the conclusion, a simple yet effective approach dubbed as QDROP is proposed, which randomly drops the quantization of activations during PTQ. Extensive experiments on various tasks including computer vision (image classification, object detection) and natural language processing (text classification and question answering) prove its superiority. With QDROP, the limit of PTQ is pushed to the 2-bit activation for the first time and the accuracy boost can be up to 51.49%. Without bells and whistles, QDROP establishes a new state of the art for PTQ. Our code is available at https://github.com/wimh966/QDrop and has been integrated into MQBench (https://github.com/ModelTC/MQBench)","url_abs":"https://arxiv.org/abs/2203.05740v2","url_pdf":"https://arxiv.org/pdf/2203.05740v2.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":"qdrop-randomly-dropping-quantization-for-1","repo_url":"https://github.com/modeltc/mqbench","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"qdrop-randomly-dropping-quantization-for-1","repo_url":"https://github.com/wimh966/QDrop","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"image-classification","task_name":"image-classification"},{"task_slug":"object-detection-1","task_name":"object-detection"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.05740","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.05740"}},"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":"deterministic:regex_extraction","url":"https://github.com/wimh966/QDrop","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/ModelTC/MQBench","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/modeltc/mqbench","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_violates":1,"ran_draft_wrong":8,"ran":5,"unverified":5},"by_repo_kind":{"official":{"samples":19,"ran":14,"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":"734e5f593576355a","entry":"layer_has_weights","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/advanced_ptq.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/advanced_ptq.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"734e5f593576355a"}},{"code_sha256_prefix":"675da8641c602b03","entry":"round_ste","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/fake_quantize/qdrop_quantizer.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/fake_quantize/qdrop_quantizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"675da8641c602b03"}},{"code_sha256_prefix":"aad5f7fa5a104f83","entry":"DataSaverHook","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aad5f7fa5a104f83"}},{"code_sha256_prefix":"cae087e14b082ad7","entry":"LSQPlusFakeQuantize","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cae087e14b082ad7"}},{"code_sha256_prefix":"4aded0dd4cff11f4","entry":"LinearTempDecay","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4aded0dd4cff11f4"}},{"code_sha256_prefix":"665e30ed4645891a","entry":"LossFunction","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"665e30ed4645891a"}},{"code_sha256_prefix":"f762b59f2c5ed75b","entry":"QuantizedModule","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f762b59f2c5ed75b"}},{"code_sha256_prefix":"7d7aa73f165ae52e","entry":"_fake_quantize_learnable_per_tensor_affine_training","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/fake_quantize/qdrop_quantizer.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/fake_quantize/qdrop_quantizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d7aa73f165ae52e"}},{"code_sha256_prefix":"7daaddceec308813","entry":"fake_quantize_learnableplus_per_channel_affine_training","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7daaddceec308813"}},{"code_sha256_prefix":"128adf85beb85df4","entry":"fake_quantize_learnableplus_per_tensor_affine_training","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"128adf85beb85df4"}},{"code_sha256_prefix":"8003cb7a5176e497","entry":"lp_loss","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8003cb7a5176e497"}},{"code_sha256_prefix":"ac274433bb73e20c","entry":"node2modules","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/advanced_ptq.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/advanced_ptq.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ac274433bb73e20c"}},{"code_sha256_prefix":"2df773973fe13be2","entry":"qnode2fpnode","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/advanced_ptq.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/advanced_ptq.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2df773973fe13be2"}},{"code_sha256_prefix":"01e81fd5942011ad","entry":"save_inp_oup_data","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01e81fd5942011ad"}},{"code_sha256_prefix":"a1873dbf3ee330ef","entry":"LSQFakeQuantize","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.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":"a1873dbf3ee330ef"}},{"code_sha256_prefix":"21646d4b40b8c655","entry":"QDropFakeQuantize","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/fake_quantize/qdrop_quantizer.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/fake_quantize/qdrop_quantizer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"21646d4b40b8c655"}},{"code_sha256_prefix":"7c23cc16e1d8d7b3","entry":"QuantizeBase","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/fake_quantize/qdrop_quantizer.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/fake_quantize/qdrop_quantizer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7c23cc16e1d8d7b3"}},{"code_sha256_prefix":"ff3b513126ce71ed","entry":"_fake_quantize_learnable_per_channel_affine_training","repo":"modeltc/mqbench","repo_kind":"official","path":"mqbench/fake_quantize/qdrop_quantizer.py","file_url":"https://github.com/modeltc/mqbench/blob/HEAD/mqbench/fake_quantize/qdrop_quantizer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ff3b513126ce71ed"}},{"code_sha256_prefix":"e62a3ec748b29b66","entry":"reconstruction","repo":"wimh966/QDrop","repo_kind":"official","path":"qdrop/solver/recon.py","file_url":"https://github.com/wimh966/QDrop/blob/HEAD/qdrop/solver/recon.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":"e62a3ec748b29b66"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}