{"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/dlp-dynamic-layerwise-pruning-in-large","title":"DLP: Dynamic Layerwise Pruning in Large Language Models","arxiv_id":"2505.23807","date":"2025-05-27","proceeding":null,"authors":["Yuli Chen","Bo Cheng","Jiale Han","Yingying Zhang","Yingting Li","Shuhao Zhang"],"abstract":"Pruning has recently been widely adopted to reduce the parameter scale and improve the inference efficiency of Large Language Models (LLMs). Mainstream pruning techniques often rely on uniform layerwise pruning strategies, which can lead to severe performance degradation at high sparsity levels. Recognizing the varying contributions of different layers in LLMs, recent studies have shifted their focus toward non-uniform layerwise pruning. However, these approaches often rely on pre-defined values, which can result in suboptimal performance. To overcome these limitations, we propose a novel method called Dynamic Layerwise Pruning (DLP). This approach adaptively determines the relative importance of each layer by integrating model weights with input activation information, assigning pruning rates accordingly. Experimental results show that DLP effectively preserves model performance at high sparsity levels across multiple LLMs. Specifically, at 70% sparsity, DLP reduces the perplexity of LLaMA2-7B by 7.79 and improves the average accuracy by 2.7% compared to state-of-the-art methods. Moreover, DLP is compatible with various existing LLM compression techniques and can be seamlessly integrated into Parameter-Efficient Fine-Tuning (PEFT). We release the code at https://github.com/ironartisan/DLP to facilitate future research.","url_abs":"https://arxiv.org/abs/2505.23807v3","url_pdf":"https://arxiv.org/pdf/2505.23807v3.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":"dlp-dynamic-layerwise-pruning-in-large","repo_url":"https://github.com/ironartisan/dlp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"parameter-efficient-fine-tuning","task_name":"parameter-efficient fine-tuning"}],"methods":[{"method_slug":"focus","method_name":"Focus"},{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2505.23807","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.23807"}},"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/ironartisan/dlp","reach":null}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"ran":0,"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":"c8eb582a1c308afe","entry":"WrappedGPT","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"c8eb582a1c308afe"}},{"code_sha256_prefix":"c668683d68ff5099","entry":"get_c4","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"c668683d68ff5099"}},{"code_sha256_prefix":"bc4ca91c9242b32f","entry":"get_dlp_ratios","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"bc4ca91c9242b32f"}},{"code_sha256_prefix":"b28bde5b41cc1c86","entry":"get_dlp_structure_ratios","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"b28bde5b41cc1c86"}},{"code_sha256_prefix":"2eaf81f9b2452228","entry":"get_loaders","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"2eaf81f9b2452228"}},{"code_sha256_prefix":"6286af97d1bc3835","entry":"get_ptb","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"6286af97d1bc3835"}},{"code_sha256_prefix":"dd6b0a913778761d","entry":"get_wikitext2","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"dd6b0a913778761d"}},{"code_sha256_prefix":"e4d334bd3c44b2c4","entry":"prepare_calibration_input_opt","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"e4d334bd3c44b2c4"}},{"code_sha256_prefix":"b11c3039afd17a76","entry":"prune_wanda_dlp","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"b11c3039afd17a76"}},{"code_sha256_prefix":"8f990c5a3cfb6939","entry":"prune_wanda_dlp","repo":"ironartisan/dlp","repo_kind":"official","path":"lib/prune.py","file_url":"https://github.com/ironartisan/dlp/blob/HEAD/lib/prune.py","link_basis":"first_harvest_node","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":"8f990c5a3cfb6939"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}