SlimGPT: Layer-wise Structured Pruning for Large Language Models

Gui Ling, Ziyang Wang, Yuliang Yan, Qingwen Liu
12/1/2024
quantization-pruning

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) have garnered significant attention for their remarkable capabilities across various domains, whose vast parameter scales present challenges for practical deployment. Structured pruning is an effective method to balance model performance with efficiency, but performance restoration under computational resource constraints is a principal challenge in pruning LLMs.

Show full abstract

Therefore, we present a low-cost and fast structured pruning method for LLMs named SlimGPT based on the Optimal Brain Surgeon framework. We propose Batched Greedy Pruning for rapid and near-optimal pruning, which enhances the accuracy of head-wise pruning error estimation through grouped Cholesky decomposition and improves the pruning efficiency of FFN via Dynamic Group Size, thereby achieving approximate local optimal pruning results within one hour. Besides, we explore the limitations of layer-wise pruning from the perspective of error accumulation and propose Incremental Pruning Ratio, a non-uniform pruning strategy to reduce performance degradation. Experimental results on the LLaMA benchmark show that SlimGPT outperforms other methods and achieves state-of-the-art results.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ling2024slimgpt,
  title  = {SlimGPT: Layer-wise Structured Pruning for Large Language Models},
  author = {Gui Ling and Ziyang Wang and Yuliang Yan and Qingwen Liu},
  year   = {2024},
  eprint = {2412.18110},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2412.18110},
  url    = {https://arxiv.org/abs/2412.18110},
  journal = {NEURIPS 2024 2024}
}

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

Discussion