{"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/compresso-structured-pruning-with","title":"Compresso: Structured Pruning with Collaborative Prompting Learns Compact Large Language Models","arxiv_id":"2310.05015","date":"2023-10-08","proceeding":null,"authors":["Song Guo","Jiahang Xu","Li Lyna Zhang","Mao Yang"],"abstract":"Despite the remarkable success of Large Language Models (LLMs), the massive size poses significant deployment challenges, particularly on resource-constrained hardware. While existing LLM compression methods focus on quantization, pruning remains relatively unexplored due to the high cost of training-based approaches and data collection challenges. One-shot pruning methods, although cost-effective and data-free, have become dominant in LLM pruning, but lead to performance decline under the structured pruning setting. In this work, we introduce a new paradigm for structurally pruning LLMs, called Compresso. Our approach, through the collaboration of the proposed resource-efficient pruning algorithm and the LLM itself, learns optimal pruning decisions during the training process. Compresso addresses the challenges of expensive training costs and data collection by incorporating Low-Rank Adaptation (LoRA) into the $L_0$ regularization during the instruction tuning process. Then, we further augment the pruning algorithm by introducing a collaborative prompt that fosters collaboration between the LLM and the pruning algorithm, significantly boosting the overall performance. To this end, Compresso prunes LLaMA-7B to 5.4B, maintaining original performance and even surpassing LLaMA-7B in reading comprehension by 2.62%. Extensive experiments demonstrate that Compresso significantly outperforms one-shot pruning baselines across various sparsity ratios, achieving up to 2.21%, 11.43%, 7.04%, and 4.81% higher scores on the commonsense reasoning, reading comprehension, MMLU, and BBH benchmarks, respectively.","url_abs":"https://arxiv.org/abs/2310.05015v2","url_pdf":"https://arxiv.org/pdf/2310.05015v2.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":"compresso-structured-pruning-with","repo_url":"https://github.com/microsoft/moonlit","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"mmlu","task_name":"MMLU"},{"task_slug":"natural-language-understanding","task_name":"Natural Language Understanding"},{"task_slug":"reading-comprehension","task_name":"Reading Comprehension"}],"methods":[{"method_slug":"llama","method_name":"LLaMA"},{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.05015","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.05015"}},"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/microsoft/moonlit","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3},"by_repo_kind":{"official":{"samples":3,"ran":3,"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":"dc428312d2d19754","entry":"get_bank_id","repo":"microsoft/moonlit","repo_kind":"official","path":"ElasticViT/train_eval_supernet.py","file_url":"https://github.com/microsoft/moonlit/blob/HEAD/ElasticViT/train_eval_supernet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dc428312d2d19754"}},{"code_sha256_prefix":"fb7fad0bf42c8691","entry":"get_bank_id_direction","repo":"microsoft/moonlit","repo_kind":"official","path":"ElasticViT/train_eval_supernet.py","file_url":"https://github.com/microsoft/moonlit/blob/HEAD/ElasticViT/train_eval_supernet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fb7fad0bf42c8691"}},{"code_sha256_prefix":"a69dcb0d52e1bae2","entry":"set_lora_args","repo":"microsoft/moonlit","repo_kind":"official","path":"Compresso/merge_weights.py","file_url":"https://github.com/microsoft/moonlit/blob/HEAD/Compresso/merge_weights.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a69dcb0d52e1bae2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}