{"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/near-lossless-post-training-quantization-of","title":"Post-Training Piecewise Linear Quantization for Deep Neural Networks","arxiv_id":"2002.00104","date":"2020-01-31","proceeding":"ECCV 2020 8","authors":["Jun Fang","Ali Shafiee","Hamzah Abdel-Aziz","David Thorsley","Georgios Georgiadis","Joseph Hassoun"],"abstract":"Quantization plays an important role in the energy-efficient deployment of deep neural networks on resource-limited devices. Post-training quantization is highly desirable since it does not require retraining or access to the full training dataset. The well-established uniform scheme for post-training quantization achieves satisfactory results by converting neural networks from full-precision to 8-bit fixed-point integers. However, it suffers from significant performance degradation when quantizing to lower bit-widths. In this paper, we propose a piecewise linear quantization (PWLQ) scheme to enable accurate approximation for tensor values that have bell-shaped distributions with long tails. Our approach breaks the entire quantization range into non-overlapping regions for each tensor, with each region being assigned an equal number of quantization levels. Optimal breakpoints that divide the entire range are found by minimizing the quantization error. Compared to state-of-the-art post-training quantization methods, experimental results show that our proposed method achieves superior performance on image classification, semantic segmentation, and object detection with minor overhead.","url_abs":"https://arxiv.org/abs/2002.00104v2","url_pdf":"https://arxiv.org/pdf/2002.00104v2.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":"near-lossless-post-training-quantization-of","repo_url":"https://github.com/jakc4103/piecewise-quantization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"near-lossless-post-training-quantization-of","repo_url":"https://github.com/jun-fang/PWLQ","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"near-lossless-post-training-quantization-of","repo_url":"https://github.com/pengshuang/PTQ4Protein","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}}],"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":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"image-classification","task_name":"image-classification"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2002.00104","atlas_url":"https://app.syntology.ai/?focus=2002.00104","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.00104"}},"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/jakc4103/piecewise-quantization","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jun-fang/PWLQ","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pengshuang/PTQ4Protein","reach":{"status":"unanswered"}}],"summary":{"ran_fixture":1,"unverified":3},"by_repo_kind":{"listed":{"samples":4,"ran":1,"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":4,"samples":[{"code_sha256_prefix":"ce590a0abac42625","entry":"quantize","repo":"jakc4103/piecewise-quantization","repo_kind":"listed","path":"utils/quantize.py","file_url":"https://github.com/jakc4103/piecewise-quantization/blob/HEAD/utils/quantize.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce590a0abac42625"}},{"code_sha256_prefix":"7f10a4d32e41b1a1","entry":"piecewise_linear_quant","repo":"jun-fang/PWLQ","repo_kind":"listed","path":"quant/pwlq.py","file_url":"https://github.com/jun-fang/PWLQ/blob/HEAD/quant/pwlq.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"7f10a4d32e41b1a1"}},{"code_sha256_prefix":"fd5607aab4d234ba","entry":"pwlq_coarse2fine_grid_search","repo":"jun-fang/PWLQ","repo_kind":"listed","path":"quant/pwlq.py","file_url":"https://github.com/jun-fang/PWLQ/blob/HEAD/quant/pwlq.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"fd5607aab4d234ba"}},{"code_sha256_prefix":"5d3591578028c24a","entry":"pwlq_quant_error","repo":"jun-fang/PWLQ","repo_kind":"listed","path":"quant/pwlq.py","file_url":"https://github.com/jun-fang/PWLQ/blob/HEAD/quant/pwlq.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5d3591578028c24a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}