The LLM Surgeon

Tycho F. A. van der Ouderaa, Markus Nagel, Mart van Baalen, Yuki M. Asano, Tijmen Blankevoort
12/28/2023
cs.LGcs.CL

No official code found. Best implementation: Qualcomm-AI-research/llm-surgeon (35 stars, BSD-3-Clause-Clear, last commit 2024-05-24).

Abstract

State-of-the-art language models are becoming increasingly large in an effort to achieve the highest performance on large corpora of available textual data. However, the sheer size of the Transformer architectures makes it difficult to deploy models within computational, environmental or device-specific constraints. We explore data-driven compression of existing pretrained models as an alternative to training smaller models from scratch. To do so, we scale Kronecker-factored curvature approximations of the target loss landscape to large language models. In doing so, we can compute both the dynamic allocation of structures that can be removed as well as updates of remaining weights that account for the removal. We provide a general framework for unstructured, semi-structured and structured pruning and improve upon weight updates to capture more correlations between weights, while remaining computationally efficient. Experimentally, our method can prune rows and columns from a range of OPT models and Llamav2-7B by 20%-30%, with a negligible loss in performance, and achieve state-of-the-art results in unstructured and semi-structured pruning of large language models.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause-Clear
355Shell, PythonFeb 16, 20242 years agoBSD-3-Clause-Clear

Similar Papers

Cite this paper

@article{ouderaa2023surgeon,
  title  = {The LLM Surgeon},
  author = {Tycho F. A. van der Ouderaa and Markus Nagel and Mart van Baalen and Yuki M. Asano and Tijmen Blankevoort},
  year   = {2023},
  eprint = {2312.17244},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.17244v2}
}

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/2312.17244.svg)](https://codeofpaper.com/paper/2312.17244)

Discussion