{"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/trained-uniform-quantization-for-accurate-and","title":"Trained Quantization Thresholds for Accurate and Efficient Fixed-Point Inference of Deep Neural Networks","arxiv_id":"1903.08066","date":"2019-03-19","proceeding":null,"authors":["Sambhav R. Jain","Albert Gural","Michael Wu","Chris H. Dick"],"abstract":"We propose a method of training quantization thresholds (TQT) for uniform symmetric quantizers using standard backpropagation and gradient descent. Contrary to prior work, we show that a careful analysis of the straight-through estimator for threshold gradients allows for a natural range-precision trade-off leading to better optima. Our quantizers are constrained to use power-of-2 scale-factors and per-tensor scaling of weights and activations to make it amenable for hardware implementations. We present analytical support for the general robustness of our methods and empirically validate them on various CNNs for ImageNet classification. We are able to achieve near-floating-point accuracy on traditionally difficult networks such as MobileNets with less than 5 epochs of quantized (8-bit) retraining. Finally, we present Graffitist, a framework that enables automatic quantization of TensorFlow graphs for TQT (available at https://github.com/Xilinx/graffitist ).","url_abs":"https://arxiv.org/abs/1903.08066v3","url_pdf":"https://arxiv.org/pdf/1903.08066v3.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":"trained-uniform-quantization-for-accurate-and","repo_url":"https://github.com/Xilinx/graffitist","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"trained-uniform-quantization-for-accurate-and","repo_url":"https://github.com/PannenetsF/TQT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1903.08066","atlas_url":"https://app.syntology.ai/?focus=1903.08066","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1903.08066"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/Xilinx/graffitist","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PannenetsF/TQT","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran":2,"unverified":8},"by_repo_kind":{"listed":{"samples":10,"ran":2,"repositories":1}},"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":"ed42e29f9cacc3f3","entry":"kl_divergence","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/analyse/kl.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/analyse/kl.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ed42e29f9cacc3f3"}},{"code_sha256_prefix":"99cb38faf7eee70f","entry":"make_bn_fold_with_previous","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/utils.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"99cb38faf7eee70f"}},{"code_sha256_prefix":"88f6fe05aa7308db","entry":"config_acti","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/config.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"88f6fe05aa7308db"}},{"code_sha256_prefix":"cb7a1e0dbb7a09a9","entry":"config_bn","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/config.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"cb7a1e0dbb7a09a9"}},{"code_sha256_prefix":"f2f3595832793e27","entry":"config_conv_linear","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/config.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f2f3595832793e27"}},{"code_sha256_prefix":"94a45a0faabc1f13","entry":"fold_CB","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/fold/fold_op.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/fold/fold_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"94a45a0faabc1f13"}},{"code_sha256_prefix":"239de305c96f91ce","entry":"fold_CBR","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/fold/fold_op.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/fold/fold_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"239de305c96f91ce"}},{"code_sha256_prefix":"f2c965afd1753bc3","entry":"fold_SABR","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/fold/fold_op.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/fold/fold_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f2c965afd1753bc3"}},{"code_sha256_prefix":"4fea127b33348b00","entry":"get_all_layers","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/fused_config.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/fused_config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4fea127b33348b00"}},{"code_sha256_prefix":"a0e0d8bfa694710c","entry":"kl_similarity","repo":"PannenetsF/TQT","repo_kind":"listed","path":"tqt/analyse/kl.py","file_url":"https://github.com/PannenetsF/TQT/blob/HEAD/tqt/analyse/kl.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a0e0d8bfa694710c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}