Structured Pruning of Large Language Models

Ziheng Wang, Jeremy Wohlwend, Tao Lei
10/10/2019
cs.CLcs.LGstat.ML

Official code: asappresearch/flop (45 stars, MIT, last commit 2023-10-10).

Abstract

Large language models have recently achieved state of the art performance across a wide variety of natural language tasks. Meanwhile, the size of these models and their latency have significantly increased, which makes their usage costly, and raises an interesting question: do language models need to be large? We study this question through the lens of model compression. We present a generic, structured pruning approach by parameterizing each weight matrix using its low-rank factorization, and adaptively removing rank-1 components during training. On language modeling tasks, our structured approach outperforms other unstructured and block-structured pruning baselines at various compression levels, while achieving significant speedups during both training and inference. We also demonstrate that our method can be applied to pruning adaptive word embeddings in large language models, and to pruning the BERT model on several downstream fine-tuning classification benchmarks.

View on arXivView PDF

Code Implementations(1)

asappresearch/flopOfficial100%
MIT

Pytorch library for factorized L0-based pruning.

4513PythonOct 22, 20193 years agoMIT

Similar Papers

Cite this paper

@article{wang2019structured,
  title  = {Structured Pruning of Large Language Models},
  author = {Ziheng Wang and Jeremy Wohlwend and Tao Lei},
  year   = {2019},
  eprint = {1910.04732},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1910.04732}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1910.04732.svg)](https://codeofpaper.com/paper/1910.04732)

Discussion