Papers › Structured Pruning Learns Compact and Accurate Models

Structured Pruning Learns Compact and Accurate Models

1 Apr 2022ACL 2022 5arXiv:2204.00408archive 2025-07-28

Mengzhou Xia, Zexuan Zhong, Danqi Chen

The growing size of neural language models has led to increased attention in model compression. The two predominant approaches are pruning, which gradually removes weights from a pre-trained model, and distillation, which trains a smaller compact model to match a larger one. Pruning methods can significantly reduce the model size but hardly achieve large speedups as distillation. However, distillation methods require large amounts of unlabeled data and are expensive to train. In this work, we propose a task-specific structured pruning method CoFi (Coarse- and Fine-grained Pruning), which delivers highly parallelizable subnetworks and matches the distillation methods in both accuracy and latency, without resorting to any unlabeled data. Our key insight is to jointly prune coarse-grained (e.g., layers) and fine-grained (e.g., heads and hidden units) modules, which controls the pruning decision of each parameter with masks of different granularity. We also devise a layerwise distillation strategy to transfer knowledge from unpruned to pruned models during optimization. Our experiments on GLUE and SQuAD datasets show that CoFi yields models with over 10x speedups with a small accuracy drop, showing its effectiveness and efficiency compared to previous pruning and distillation approaches.

PaperPDFConference PDFCodeCode 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="2204.00408")

Code

Syntology Ran 9 of 12 code samples harvested from 3 repositories linked to this paper; 3 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 7 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 1 sample from 1 repository, 0 ran; found in paper text by Syntology: 10 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

princeton-nlp/cofipruning officialmentioned in papermentioned on GitHubpytorch report
jongwooko/nash-pruning-official mentioned on GitHubpytorch 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

12 samples harvested; 9 ran; 0 honoured the contract we drafted; 3 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.

2ran · our draft was wrong
7ran
3unverified

Licence: 10 of the 12 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 3 repositories linked to this paper, official or community; each sample names its own and says which. “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.

L0Module princeton-nlp/cofipruning/models/l0_module.py official repository ran · metamorphic tier: deterministic MIT (permissive) · ef9ec1a11223fbd0 · report
L0Module jongwooko/nash-pruning-official/models/l0_module.py community (archive-listed) unverified MIT (permissive) · 4609348007b5c7f7 · report
SuperBertIntermediate huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · f868beb1186a0be6 · report
SuperBertLayerNorm huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · a788435baa6f3652 · report
SuperBertOutput huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · 42db1dab8b861073 · report
SuperBertSelfAttention huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · 85b2789fba54e4c8 · report
SuperBertSelfOutput huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · 47debaa2ae1929ad · report
SuperLinear huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · f2877934d142e015 · report
sample_bias huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 8f3031bdf0cdcbce · report
sample_weight huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 7ae41cd971c17070 · report
SuperBertAttention huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology unverified no licence file found · pointer only · 0c8206b768637d45 · report
SuperBertLayer huawei-noah/Pretrained-Language-Model/AutoTinyBERT/transformer/modeling_extractor.py found in paper text by Syntology unverified no licence file found · pointer only · 48eeeaddaa79fd07 · report

Tasks

Model Compression

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Pruning

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