A Simple and Effective Pruning Approach for Large Language Models
Mingjie Sun*, Zhuang Liu*, Anna Bair, J. Zico Kolter (* indicates equal contribution)
Carnegie Mellon University, Meta AI Research and Bosch Center for AI
Paper - Project page
@article{sun2023wanda,
title={A Simple and Effective Pruning Approach for Large Language Models},
author={Sun, Mingjie and Liu, Zhuang and Bair, Anna and Kolter, J. Zico},
year={2023},
journal={arXiv preprint arXiv:2306.11695}
}
Their repository is built upon the SparseGPT repository.
Their project is released under the MIT license.
Adapted from the solution offered by the authors, which is built on the dropout repository.
Here is the command for pruning ConvNeXt/ViT models:
python main.py --model [ARCH] \
--data_path [PATH to ImageNet] \
--resume [PATH to the pretrained weights] \
--prune_metric wanda \
--prune_granularity row \
--sparsity 0.5
where:
--model
: network architecture, choices [convnext_base
,deit_base_patch16_224
,vit_base_patch16_224
].--resume
: model path to downloaded pretrained weights.--prune_metric
: [magnitude
,wanda
].--prune_granularity
: [layer
,row
].