{"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/quantized-neural-networks-training-neural","title":"Quantized Neural Networks: Training Neural Networks with Low Precision Weights and Activations","arxiv_id":"1609.07061","date":"2016-09-22","proceeding":null,"authors":["Itay Hubara","Matthieu Courbariaux","Daniel Soudry","Ran El-Yaniv","Yoshua Bengio"],"abstract":"We introduce a method to train Quantized Neural Networks (QNNs) --- neural\nnetworks with extremely low precision (e.g., 1-bit) weights and activations, at\nrun-time. At train-time the quantized weights and activations are used for\ncomputing the parameter gradients. During the forward pass, QNNs drastically\nreduce memory size and accesses, and replace most arithmetic operations with\nbit-wise operations. As a result, power consumption is expected to be\ndrastically reduced. We trained QNNs over the MNIST, CIFAR-10, SVHN and\nImageNet datasets. The resulting QNNs achieve prediction accuracy comparable to\ntheir 32-bit counterparts. For example, our quantized version of AlexNet with\n1-bit weights and 2-bit activations achieves $51\\%$ top-1 accuracy. Moreover,\nwe quantize the parameter gradients to 6-bits as well which enables gradients\ncomputation using only bit-wise operation. Quantized recurrent neural networks\nwere tested over the Penn Treebank dataset, and achieved comparable accuracy as\ntheir 32-bit counterparts using only 4-bits. Last but not least, we programmed\na binary matrix multiplication GPU kernel with which it is possible to run our\nMNIST QNN 7 times faster than with an unoptimized GPU kernel, without suffering\nany loss in classification accuracy. The QNN code is available online.","url_abs":"http://arxiv.org/abs/1609.07061v1","url_pdf":"http://arxiv.org/pdf/1609.07061v1.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":"quantized-neural-networks-training-neural","repo_url":"https://github.com/CR-Ko/BinaryNet-Caffe2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"caffe2","reach":{"status":"ok"}},{"paper_slug":"quantized-neural-networks-training-neural","repo_url":"https://github.com/PIlotcnc/neural","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"quantized-neural-networks-training-neural","repo_url":"https://github.com/neuralmagic/sparseml","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"quantized-neural-networks-training-neural","repo_url":"https://github.com/neuralmagic/sparsify","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"quantized-neural-networks-training-neural","repo_url":"https://github.com/yashkant/ENAS-Quantized-Neural-Networks","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":null,"task_name":"GPU"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"local-response-normalization","method_name":"Local Response Normalization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1609.07061","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1609.07061"}},"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/neuralmagic/sparseml","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yashkant/ENAS-Quantized-Neural-Networks","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/CR-Ko/BinaryNet-Caffe2","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/neuralmagic/sparsify","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PIlotcnc/neural","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":12},"by_repo_kind":{"listed":{"samples":12,"ran":0,"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":"c55723df4fa1140d","entry":"add_data_opts","repo":"neuralmagic/sparsify","repo_kind":"listed","path":"src/sparsify/cli/opts.py","file_url":"https://github.com/neuralmagic/sparsify/blob/HEAD/src/sparsify/cli/opts.py","link_basis":"harvester_set","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":"c55723df4fa1140d"}},{"code_sha256_prefix":"64dc20dca8882db2","entry":"add_deploy_opts","repo":"neuralmagic/sparsify","repo_kind":"listed","path":"src/sparsify/cli/opts.py","file_url":"https://github.com/neuralmagic/sparsify/blob/HEAD/src/sparsify/cli/opts.py","link_basis":"harvester_set","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":"64dc20dca8882db2"}},{"code_sha256_prefix":"fb67524ca6f08994","entry":"convert_example_to_features","repo":"PIlotcnc/neural","repo_kind":"listed","path":"integrations/transformers/run_distill_qa.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/integrations/transformers/run_distill_qa.py","link_basis":"harvester_set","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":"fb67524ca6f08994"}},{"code_sha256_prefix":"e73fc1a24af5a318","entry":"detect_framework","repo":"PIlotcnc/neural","repo_kind":"listed","path":"src/sparseml/base.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/src/sparseml/base.py","link_basis":"harvester_set","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":"e73fc1a24af5a318"}},{"code_sha256_prefix":"b05e6b10690ba830","entry":"drop_layers","repo":"PIlotcnc/neural","repo_kind":"listed","path":"integrations/transformers/run_distill_qa.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/integrations/transformers/run_distill_qa.py","link_basis":"harvester_set","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":"b05e6b10690ba830"}},{"code_sha256_prefix":"8c8865bf5862de8e","entry":"execute_in_sparseml_framework","repo":"PIlotcnc/neural","repo_kind":"listed","path":"src/sparseml/base.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/src/sparseml/base.py","link_basis":"harvester_set","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":"8c8865bf5862de8e"}},{"code_sha256_prefix":"37057a7078af9a5d","entry":"get_kr_layer","repo":"PIlotcnc/neural","repo_kind":"listed","path":"utils/pytorch2keras.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/utils/pytorch2keras.py","link_basis":"harvester_set","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":"37057a7078af9a5d"}},{"code_sha256_prefix":"0988e1f7835f94f8","entry":"get_pytorch_name","repo":"PIlotcnc/neural","repo_kind":"listed","path":"utils/pytorch2keras.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/utils/pytorch2keras.py","link_basis":"harvester_set","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":"0988e1f7835f94f8"}},{"code_sha256_prefix":"416986508915b636","entry":"get_version","repo":"PIlotcnc/neural","repo_kind":"listed","path":"src/sparseml/base.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/src/sparseml/base.py","link_basis":"harvester_set","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":"416986508915b636"}},{"code_sha256_prefix":"6fe673c869d15b78","entry":"load_and_normalize_cifar10","repo":"PIlotcnc/neural","repo_kind":"listed","path":"integrations/keras/prune_resnet20.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/integrations/keras/prune_resnet20.py","link_basis":"harvester_set","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":"6fe673c869d15b78"}},{"code_sha256_prefix":"181ade20c4851e11","entry":"postprocess_qa_predictions","repo":"PIlotcnc/neural","repo_kind":"listed","path":"integrations/transformers/utils_qa.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/integrations/transformers/utils_qa.py","link_basis":"harvester_set","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":"181ade20c4851e11"}},{"code_sha256_prefix":"b33c979ffa9d04b2","entry":"postprocess_qa_predictions_with_beam_search","repo":"PIlotcnc/neural","repo_kind":"listed","path":"integrations/transformers/utils_qa.py","file_url":"https://github.com/PIlotcnc/neural/blob/HEAD/integrations/transformers/utils_qa.py","link_basis":"harvester_set","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":"b33c979ffa9d04b2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}