Papers › A Simple and Effective Pruning Approach for Large Language Models

A Simple and Effective Pruning Approach for Large Language Models

20 Jun 2023arXiv:2306.11695archive 2025-07-28

MingJie Sun, Zhuang Liu, Anna Bair, J. Zico Kolter

As their size increases, Large Languages Models (LLMs) are natural candidates for network pruning methods: approaches that drop a subset of network weights while striving to preserve performance. Existing methods, however, require either retraining, which is rarely affordable for billion-scale LLMs, or solving a weight reconstruction problem reliant on second-order information, which may also be computationally expensive. In this paper, we introduce a novel, straightforward yet effective pruning method, termed Wanda (Pruning by Weights and activations), designed to induce sparsity in pretrained LLMs. Motivated by the recent observation of emergent large magnitude features in LLMs, our approach prunes weights with the smallest magnitudes multiplied by the corresponding input activations, on a per-output basis. Notably, Wanda requires no retraining or weight update, and the pruned LLM can be used as is. We conduct a thorough evaluation of our method Wanda on LLaMA and LLaMA-2 across various language benchmarks. Wanda significantly outperforms the established baseline of magnitude pruning and performs competitively against recent method involving intensive weight update. Code is available at https://github.com/locuslab/wanda.

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="2306.11695")

Code

Syntology Ran 9 of 22 code samples harvested from 5 repositories linked to this paper; 13 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 5 ran with no contract checked.

By repository: official repository: 6 samples from 1 repository, 2 ran; community (archive-listed): 15 samples from 4 repositories, 6 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

locuslab/wanda officialmentioned in papermentioned on GitHubpytorch report
baithebest/adagp mentioned on GitHubpytorch report
baithebest/sparsellm mentioned on GitHubpytorchApache-2.0 report
crystaleye42/eval-safety mentioned on GitHubpytorch report
nvlabs/maskllm mentioned on GitHubpytorchNOASSERTION report
qiaoxiao7282/seft mentioned on GitHubpytorch report
ruchikachavhan/concept-prune 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

22 samples harvested; 9 ran; 1 honoured the contract we drafted; 13 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.

1ran · honoured contract
2ran · our draft was wrong
1ran · fixture could not drive it
5ran
13unverified

Licence: 9 of the 22 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 5 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “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.

check_sparsity locuslab/wanda/lib/prune.py official repository ran · honoured contract MIT (permissive) · 3b7b64b9aea9a039 · report
find_layers locuslab/wanda/lib/prune.py official repository ran · our draft was wrong MIT (permissive) · 56ac52f94f2cc872 · report
get_c4 locuslab/wanda/lib/prune.py official repository unverified MIT (permissive) · 5a7a61a0235b3907 · report
get_loaders locuslab/wanda/lib/prune.py official repository unverified MIT (permissive) · d2a4a72ebbf33444 · report
prepare_calibration_input locuslab/wanda/lib/prune.py official repository unverified MIT (permissive) · 33272894b6721cfb · report
prune_wanda locuslab/wanda/lib/prune.py official repository unverified MIT (permissive) · 20569259cb1e7307 · report
BaseNeuronReceiver ruchikachavhan/concept-prune/neuron_receivers/wanda_receiver.py community (archive-listed) ran no licence file found · pointer only · f0bf77723cb645ec · report
ColumnNormCalculator ruchikachavhan/concept-prune/neuron_receivers/wanda_receiver.py community (archive-listed) ran no licence file found · pointer only · 5a2c0dc15b39cddf · report
SparseGPT_LlaMA baithebest/adagp/pruning_utils.py community (archive-listed) ran Apache-2.0 (permissive) · e36ff7e861167680 · report
TimeLayerColumnNorm ruchikachavhan/concept-prune/neuron_receivers/wanda_receiver.py community (archive-listed) ran no licence file found · pointer only · fbd6d90f750b7edc · report
Wanda ruchikachavhan/concept-prune/neuron_receivers/wanda_receiver.py community (archive-listed) ran no licence file found · pointer only · ac7406fce0dca1ac · report
return_given_alpha crystaleye42/eval-safety/lib/prune.py community (archive-listed) ran · fixture could not drive it MIT (permissive) · d79ce728b3ab7682 · report
get_c4 crystaleye42/eval-safety/lib/prune.py community (archive-listed) unverified MIT (permissive) · 9660cb0c932e836e · report
get_c4 qiaoxiao7282/seft/lib/prune_all.py community (archive-listed) unverified no licence file found · pointer only · 112fa6e5a362cc14 · report
get_loaders crystaleye42/eval-safety/lib/prune.py community (archive-listed) unverified MIT (permissive) · 142350989c8691e6 · report
get_loaders qiaoxiao7282/seft/lib/prune_all.py community (archive-listed) unverified no licence file found · pointer only · a0fc985586f0984c · report
get_wikitext2 crystaleye42/eval-safety/lib/prune.py community (archive-listed) unverified MIT (permissive) · 1afe3719e760f32e · report
prepare_calibration_input crystaleye42/eval-safety/lib/prune.py community (archive-listed) unverified MIT (permissive) · 9aed9bf93575f59e · report
prepare_calibration_input qiaoxiao7282/seft/lib/prune_all.py community (archive-listed) unverified no licence file found · pointer only · 09d5f6f2798113c6 · report
prune_wanda crystaleye42/eval-safety/lib/prune.py community (archive-listed) unverified MIT (permissive) · f4e32af5cd3a92c5 · report
prune_wanda qiaoxiao7282/seft/lib/prune_all.py community (archive-listed) unverified no licence file found · pointer only · 3754399ccd7d5c49 · report
sc identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 02fe1aebf8355cab · report

Tasks

Network Pruning

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