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 ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 12 code samples harvested from 3 repositories linked to this paper: 9 ran (of which 7 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 2 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

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

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

princeton-nlp/cofipruning officialmentioned in papermentioned on GitHubpytorchSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
jongwooko/nash-pruning-official mentioned on GitHubpytorchSyntology: 1 sample, 0 ran · 1 unverified 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 (of which 7 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 2 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is 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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 2 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

princeton-nlp/cofipruning official repository 1 sample, 1 ran (0 instrument-failed) · 0 unverified
L0Module models/l0_module.py ran · metamorphic tier: deterministic MIT (permissive) · ef9ec1a11223fbd0 · report fixture: returned L0Module · level recorded 2026-09-22
jongwooko/nash-pruning-official community (archive-listed) 1 sample, 0 ran · 1 unverified
L0Module models/l0_module.py unverified MIT (permissive) · 4609348007b5c7f7 · report
huawei-noah/Pretrained-Language-Model found in paper text by Syntology 10 samples, 8 ran (2 instrument-failed) · 2 unverified
SuperBertIntermediate AutoTinyBERT/transformer/modeling_extractor.py ran · metamorphic tier: deterministic no licence file found · pointer only · f868beb1186a0be6 · report fixture: returned SuperBertIntermediate · level recorded 2026-09-22
SuperBertLayerNorm AutoTinyBERT/transformer/modeling_extractor.py ran · metamorphic tier: deterministic no licence file found · pointer only · a788435baa6f3652 · report fixture: returned SuperBertLayerNorm · level recorded 2026-09-22
SuperBertOutput AutoTinyBERT/transformer/modeling_extractor.py ran · metamorphic tier: deterministic no licence file found · pointer only · 42db1dab8b861073 · report fixture: returned SuperBertOutput · level recorded 2026-09-22
SuperBertSelfAttention AutoTinyBERT/transformer/modeling_extractor.py ran · metamorphic tier: deterministic no licence file found · pointer only · 85b2789fba54e4c8 · report fixture: returned SuperBertSelfAttention · level recorded 2026-09-22
SuperBertSelfOutput AutoTinyBERT/transformer/modeling_extractor.py ran · metamorphic tier: deterministic no licence file found · pointer only · 47debaa2ae1929ad · report fixture: returned SuperBertSelfOutput · level recorded 2026-09-22
SuperLinear AutoTinyBERT/transformer/modeling_extractor.py ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · f2877934d142e015 · report fixture: returned SuperLinear · level recorded 2026-09-22
sample_bias AutoTinyBERT/transformer/modeling_extractor.py ran · our draft was wrong no licence file found · pointer only · 8f3031bdf0cdcbce · report fixture: signature bias:Tensor/1/float, sample_out_dim:int/0/int, out_index:Tensor/1/int · returned Tensor · level recorded 2026-09-22
sample_weight in 8 papers AutoTinyBERT/transformer/modeling_extractor.py ran · our draft was wrong no licence file found · pointer only · 7ae41cd971c17070 · report fixture: signature weight:Tensor/2/float, sample_in_dim:int/0/int, sample_out_dim:int/0/int, in_index:Tensor/1/int, out_index:Tensor/1/int · returned Tensor · level recorded 2026-09-22
SuperBertAttention AutoTinyBERT/transformer/modeling_extractor.py unverified no licence file found · pointer only · 0c8206b768637d45 · report
SuperBertLayer AutoTinyBERT/transformer/modeling_extractor.py unverified no licence file found · pointer only · 48eeeaddaa79fd07 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

3 assemblies on this paper: 3 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

3 sibling assemblies for CoFi (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for CoFi (graph method: CoFi). 1 brick; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.

one of 3 siblings

  1. L0Module entry · level 1 · ran · ef9ec1a11223fbd0

harvested Assembly for CoFi (graph method: CoFi). 12 bricks; individually on a fixture: 10 ran (of which 6 constructed an object rather than computing a result; 7 with no instrument failure: 1 honoured, 0 violated, 6 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. SuperBertLayer entry · level 0 · unverified · 48eeeaddaa79fd07
  2. SuperBertAttention helper · level 0 · unverified · 0c8206b768637d45
  3. SuperBertIntermediate model · level 1 · ran · f868beb1186a0be6
  4. SuperBertOutput model · level 1 · ran · 42db1dab8b861073
  5. SuperBertSelfAttention model · level 1 · ran · 85b2789fba54e4c8
  6. SuperBertSelfOutput model · level 1 · ran · 47debaa2ae1929ad
  7. SuperLinear model · level 1 · ran · f2877934d142e015
  8. SuperBertLayerNorm model · level 1 · ran · a788435baa6f3652
  9. sample_bias helper · level 1 · ran · our draft was wrong · 8f3031bdf0cdcbce
  10. sample_weight helper · level 1 · ran · our draft was wrong · 7ae41cd971c17070
  11. gelu helper · level 1 · ran · honoured contract · fdc64f4c72036ae4
  12. swish helper · level 2 · ran · our draft was wrong · 0f786c407fb1ee4c

harvested Assembly for CoFi (graph method: CoFi). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. L0Module entry · level 0 · unverified · 4609348007b5c7f7

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2204.00408") returns these assemblies with each brick's role and wiring (how to connect).

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