{"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/what-matters-in-the-structured-pruning-of","title":"What Matters In The Structured Pruning of Generative Language Models?","arxiv_id":"2302.03773","date":"2023-02-07","proceeding":null,"authors":["Michael Santacroce","Zixin Wen","Yelong Shen","Yuanzhi Li"],"abstract":"Auto-regressive large language models such as GPT-3 require enormous computational resources to use. Traditionally, structured pruning methods are employed to reduce resource usage. However, their application to and efficacy for generative language models is heavily under-explored. In this paper we conduct an comprehensive evaluation of common structured pruning methods, including magnitude, random, and movement pruning on the feed-forward layers in GPT-type models. Unexpectedly, random pruning results in performance that is comparable to the best established methods, across multiple natural language generation tasks. To understand these results, we provide a framework for measuring neuron-level redundancy of models pruned by different methods, and discover that established structured pruning methods do not take into account the distinctiveness of neurons, leaving behind excess redundancies. In view of this, we introduce Globally Unique Movement (GUM) to improve the uniqueness of neurons in pruned models. We then discuss the effects of our techniques on different redundancy metrics to explain the improved performance.","url_abs":"https://arxiv.org/abs/2302.03773v1","url_pdf":"https://arxiv.org/pdf/2302.03773v1.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":"what-matters-in-the-structured-pruning-of","repo_url":"https://github.com/huggingface/nn_pruning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-3","method_name":"GPT-3"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"movement-pruning","method_name":"Movement Pruning"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"pruning","method_name":"Pruning"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2302.03773","atlas_url":"https://app.syntology.ai/?focus=2302.03773","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.03773"}},"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/huggingface/nn_pruning","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":2,"unverified":6},"by_repo_kind":{"official":{"samples":8,"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":"17ba54a7b0a5ce34","entry":"head_mask","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/modules/masked_nn.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/modules/masked_nn.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"17ba54a7b0a5ce34"}},{"code_sha256_prefix":"dee55cf2bd41b9a9","entry":"struct_from_name","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/model_structure.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/model_structure.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dee55cf2bd41b9a9"}},{"code_sha256_prefix":"648df3827ef1dbca","entry":"broadcast_attention_mask","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/modules/quantization.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/modules/quantization.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":"648df3827ef1dbca"}},{"code_sha256_prefix":"b327b900a4793da6","entry":"broadcast_nonorm_bias","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/modules/quantization.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/modules/quantization.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":"b327b900a4793da6"}},{"code_sha256_prefix":"917b76e8afdf3059","entry":"change_attention_mask_value","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/modules/quantization.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/modules/quantization.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":"917b76e8afdf3059"}},{"code_sha256_prefix":"cdd7f506f307304d","entry":"create_qconfig","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/modules/quantization_config.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/modules/quantization_config.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":"cdd7f506f307304d"}},{"code_sha256_prefix":"62ad5a91e86b77fa","entry":"struct_from_config","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/model_structure.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/model_structure.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":"62ad5a91e86b77fa"}},{"code_sha256_prefix":"efe631ef8ad53692","entry":"struct_from_model","repo":"huggingface/nn_pruning","repo_kind":"official","path":"nn_pruning/model_structure.py","file_url":"https://github.com/huggingface/nn_pruning/blob/HEAD/nn_pruning/model_structure.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":"efe631ef8ad53692"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}