{"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/learned-step-size-quantization","title":"Learned Step Size Quantization","arxiv_id":"1902.08153","date":"2019-02-21","proceeding":"ICLR 2020 1","authors":["Steven K. Esser","Jeffrey L. McKinstry","Deepika Bablani","Rathinakumar Appuswamy","Dharmendra S. Modha"],"abstract":"Deep networks run with low precision operations at inference time offer power and space advantages over high precision alternatives, but need to overcome the challenge of maintaining high accuracy as precision decreases. Here, we present a method for training such networks, Learned Step Size Quantization, that achieves the highest accuracy to date on the ImageNet dataset when using models, from a variety of architectures, with weights and activations quantized to 2-, 3- or 4-bits of precision, and that can train 3-bit models that reach full precision baseline accuracy. Our approach builds upon existing methods for learning weights in quantized networks by improving how the quantizer itself is configured. Specifically, we introduce a novel means to estimate and scale the task loss gradient at each weight and activation layer's quantizer step size, such that it can be learned in conjunction with other network parameters. This approach works using different levels of precision as needed for a given system and requires only a simple modification of existing training code.","url_abs":"https://arxiv.org/abs/1902.08153v3","url_pdf":"https://arxiv.org/pdf/1902.08153v3.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":"learned-step-size-quantization","repo_url":"https://github.com/Adlik/model_optimizer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/DeadAt0m/LSQ-PyTorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/DeadAt0m/LSQFakeQuantize-PyTorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/Kelvinyu1117/LSQ-implementation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/Shunli-Wang/Tiny-YOLO-LSQ","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/ZouJiu1/LSQplus","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/jiyoonkm/columnquant","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/zhutmost/lsq-net","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learned-step-size-quantization","repo_url":"https://github.com/hustzxd/LSQuantization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"model-compression","task_name":"Model Compression"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/model-compression-on-imagenet","task":"Model Compression","dataset":"ImageNet","model":"ADLIK-MO-ResNet50+W4A4","rank_in_archive_order":1,"of":12,"metrics":{"Top-1":"77.878"},"uses_additional_data":false},{"leaderboard":"/sota/model-compression-on-imagenet","task":"Model Compression","dataset":"ImageNet","model":"ADLIK-MO-ResNet50+W3A4","rank_in_archive_order":2,"of":12,"metrics":{"Top-1":"77.34"},"uses_additional_data":false},{"leaderboard":"/sota/quantization-on-imagenet","task":"Quantization","dataset":"ImageNet","model":"ADLIK-MO-ResNet50-W4A4","rank_in_archive_order":9,"of":27,"metrics":{"Activation bits":"4","Top-1 Accuracy (%)":"77.878","Weight bits":"4"},"uses_additional_data":false},{"leaderboard":"/sota/quantization-on-imagenet","task":"Quantization","dataset":"ImageNet","model":"ADLIK-MO-ResNet50-W3A4","rank_in_archive_order":10,"of":27,"metrics":{"Activation bits":"4","Top-1 Accuracy (%)":"77.34","Weight bits":"3"},"uses_additional_data":false},{"leaderboard":"/sota/quantization-on-imagenet","task":"Quantization","dataset":"ImageNet","model":"ResNet50-W4A4 (paper)","rank_in_archive_order":12,"of":27,"metrics":{"Activation bits":"4","Top-1 Accuracy (%)":"76.7","Weight bits":"4"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1902.08153","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1902.08153"}},"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/jiyoonkm/columnquant","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ZouJiu1/LSQplus","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Adlik/model_optimizer","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhutmost/lsq-net","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Kelvinyu1117/LSQ-implementation","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Shunli-Wang/Tiny-YOLO-LSQ","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hustzxd/LSQuantization","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/DeadAt0m/LSQ-PyTorch","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/DeadAt0m/LSQFakeQuantize-PyTorch","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"ran_fixture":1,"ran_honours":4,"unverified":16},"by_repo_kind":{"listed":{"samples":23,"ran":7,"repositories":4}},"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":6,"samples":[{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"model/resnet.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/model/resnet.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":"d9def42110729a85"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"model/resnet.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/model/resnet.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":"160bb14bd76201b4"}},{"code_sha256_prefix":"19f65b05591a698b","entry":"decompose_weights","repo":"jiyoonkm/columnquant","repo_kind":"listed","path":"LSQ.py","file_url":"https://github.com/jiyoonkm/columnquant/blob/HEAD/LSQ.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"19f65b05591a698b"}},{"code_sha256_prefix":"a488bae52f1bfd5d","entry":"grad_scale","repo":"jiyoonkm/columnquant","repo_kind":"listed","path":"LSQ.py","file_url":"https://github.com/jiyoonkm/columnquant/blob/HEAD/LSQ.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a488bae52f1bfd5d"}},{"code_sha256_prefix":"d75564df9359ef7b","entry":"grad_scale","repo":"hustzxd/LSQuantization","repo_kind":"listed","path":"lsq.py","file_url":"https://github.com/hustzxd/LSQuantization/blob/HEAD/lsq.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d75564df9359ef7b"}},{"code_sha256_prefix":"ed1a69e092272dba","entry":"round_pass","repo":"jiyoonkm/columnquant","repo_kind":"listed","path":"LSQ.py","file_url":"https://github.com/jiyoonkm/columnquant/blob/HEAD/LSQ.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ed1a69e092272dba"}},{"code_sha256_prefix":"40027e5e78ca8837","entry":"round_pass","repo":"hustzxd/LSQuantization","repo_kind":"listed","path":"lsq.py","file_url":"https://github.com/hustzxd/LSQuantization/blob/HEAD/lsq.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"40027e5e78ca8837"}},{"code_sha256_prefix":"9453c291b0f1f0bc","entry":"accuracy","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"process.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/process.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":"9453c291b0f1f0bc"}},{"code_sha256_prefix":"cfdac0ab4bbef047","entry":"create_model","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"model/model.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/model/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":"cfdac0ab4bbef047"}},{"code_sha256_prefix":"d111297ab7138f2f","entry":"find_modules_to_quantize","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"quan/utils.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/quan/utils.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":"d111297ab7138f2f"}},{"code_sha256_prefix":"d0100ae80d1bfe92","entry":"get_config","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"util/config.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/util/config.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":"d0100ae80d1bfe92"}},{"code_sha256_prefix":"dcafab1705c6104a","entry":"init_logger","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"util/config.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/util/config.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":"dcafab1705c6104a"}},{"code_sha256_prefix":"ecf0e2f2f2b1b80a","entry":"load_checkpoint","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"util/checkpoint.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/util/checkpoint.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":"ecf0e2f2f2b1b80a"}},{"code_sha256_prefix":"72f8eaea5e7a643d","entry":"load_data","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"util/data_loader.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/util/data_loader.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":"72f8eaea5e7a643d"}},{"code_sha256_prefix":"39de768061885cd0","entry":"lr_scheduler","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"util/lr_scheduler.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/util/lr_scheduler.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":"39de768061885cd0"}},{"code_sha256_prefix":"742d60dfe2ec0c9f","entry":"merge_nested_dict","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"util/config.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/util/config.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":"742d60dfe2ec0c9f"}},{"code_sha256_prefix":"bd2c949ff15695e5","entry":"prepare","repo":"ZouJiu1/LSQplus","repo_kind":"listed","path":"quantization/lsqquantize_V1.py","file_url":"https://github.com/ZouJiu1/LSQplus/blob/HEAD/quantization/lsqquantize_V1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"bd2c949ff15695e5"}},{"code_sha256_prefix":"c5c793591e0a89c4","entry":"quantizer","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"quan/utils.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/quan/utils.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":"c5c793591e0a89c4"}},{"code_sha256_prefix":"cd4da274de64134b","entry":"replace_module_by_names","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"quan/utils.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/quan/utils.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":"cd4da274de64134b"}},{"code_sha256_prefix":"3f5510bd7f92fad4","entry":"resnet18","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"model/resnet.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/model/resnet.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":"3f5510bd7f92fad4"}},{"code_sha256_prefix":"d759ea54f50325b0","entry":"resnet20","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"model/resnet_cifar.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/model/resnet_cifar.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":"d759ea54f50325b0"}},{"code_sha256_prefix":"472d3c550a61f926","entry":"resnet32","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"model/resnet_cifar.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/model/resnet_cifar.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":"472d3c550a61f926"}},{"code_sha256_prefix":"1db27ae5efae49cc","entry":"resnet44","repo":"zhutmost/lsq-net","repo_kind":"listed","path":"model/resnet_cifar.py","file_url":"https://github.com/zhutmost/lsq-net/blob/HEAD/model/resnet_cifar.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":"1db27ae5efae49cc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}