Papers › Pruning Large Language Models with Semi-Structural Adaptive Sparse Training

Pruning Large Language Models with Semi-Structural Adaptive Sparse Training

30 Jul 2024arXiv:2407.20584archive 2025-07-28

Weiyu Huang, Yuezhou Hu, Guohao Jian, Jun Zhu, Jianfei Chen

The remarkable success of Large Language Models (LLMs) relies heavily on their substantial scale, which poses significant challenges during model deployment in terms of latency and memory consumption. Recently, numerous studies have attempted to compress LLMs using one-shot pruning methods. However, these methods often suffer from considerable performance degradation on complex language understanding tasks, raising concerns about the feasibility of pruning in LLMs. To address this issue, we propose Adaptive Sparse Trainer (AST), a novel and efficient retraining framework tailored for semi-structured sparse models. AST enables models to learn optimal masks during the weight update process without incurring additional computational overhead. Furthermore, we demonstrate that incorporating knowledge distillation significantly improves retraining efficiency and enhances model performance under fixed computational constraints. Additionally, a supplementary set of well-initialized parameters is integrated to further augment the model's efficacy. AST achieves state-of-the-art performance with minimal training cost. When applied to the LLaMA2-7B model, AST reduces the perplexity and zero-shot accuracy gap between dense and 2:4 semi-structured sparse models to 0.6 and 1.16%, respectively, utilizing less than 0.4% of the pretraining tokens and GPU hours. Our work demonstrates the feasibility of deploying semi-structured sparse LLMs and offers a promising alternative for achieving highly compressed models when combined with existing quantization techniques.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2407.20584")

Code

Syntology Ran 6 of 8 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 6 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

thu-ml/adaptive-sparse-trainer officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

8 samples harvested; 6 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

6ran
2unverified

Licence: 0 of the 8 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from thu-ml/adaptive-sparse-trainer. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_linear_list thu-ml/adaptive-sparse-trainer/LLaMA-2-7B/llmshearing/sparse/sparse_utils.py official repository ran Apache-2.0 (permissive) · 35c39367fa876cb1 · report
get_nested_attr thu-ml/adaptive-sparse-trainer/LLaMA-2-7B/llmshearing/sparse/sparse_utils.py official repository ran Apache-2.0 (permissive) · e30216d468c41586 · report
get_raw_model thu-ml/adaptive-sparse-trainer/utils.py official repository ran Apache-2.0 (permissive) · dbbaeceaff4ae2ef · report
normal_attn_fn thu-ml/adaptive-sparse-trainer/LLaMA-2-7B/llmshearing/models/composer_llama.py official repository ran Apache-2.0 (permissive) · be527ff62ff13c04 · report
turn_head_z thu-ml/adaptive-sparse-trainer/LLaMA-2-7B/llmshearing/models/composer_llama.py official repository ran Apache-2.0 (permissive) · d3bdf5250c6d2cd9 · report
turn_mlp_z thu-ml/adaptive-sparse-trainer/LLaMA-2-7B/llmshearing/models/composer_llama.py official repository ran Apache-2.0 (permissive) · 86e85f31c3cef174 · report
eval_ppl thu-ml/adaptive-sparse-trainer/LLaMA-2-7B/llmshearing/sparse/sparse_utils.py official repository unverified Apache-2.0 (permissive) · 96c9abdf6be0e778 · report
eval_ppl thu-ml/adaptive-sparse-trainer/utils.py official repository unverified Apache-2.0 (permissive) · 95170b214d3dd627 · report

Tasks

Knowledge DistillationQuantization

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Knowledge DistillationPruningSET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections