Skip to main content
QUICK REVIEW

[Paper Review] ShortGPT: Layers in Large Language Models are More Redundant Than You Expect

Xin Men, Mingyu Xu|arXiv (Cornell University)|Mar 6, 2024
Topic ModelingComputer Science15 citations
TL;DR

ShortGPT shows significant layer-level redundancy in LLMs and removes low-BI layers to prune models, maintaining most performance with ~25% fewer parameters, and is orthogonal to quantization.

ABSTRACT

As Large Language Models (LLMs) continue to advance in performance, their size has escalated significantly, with current LLMs containing billions or even trillions of parameters. However, in this study, we discovered that many layers of LLMs exhibit high similarity, and some layers play a negligible role in network functionality. Based on this observation, we define a metric called Block Influence (BI) to gauge the significance of each layer in LLMs. We then propose a straightforward pruning approach: layer removal, in which we directly delete the redundant layers in LLMs based on their BI scores. Experiments demonstrate that our method, which we call ShortGPT, significantly outperforms previous state-of-the-art (SOTA) methods in model pruning. Moreover, ShortGPT is orthogonal to quantization-like methods, enabling further reduction in parameters and computation. The ability to achieve better results through simple layer removal, as opposed to more complex pruning techniques, suggests a high degree of redundancy in the model architecture.

Motivation & Objective

  • Investigate whether large language models have layer-level redundancy beyond parameter-level redundancy.
  • Develop a metric (Block Influence) to quantify each layer's importance in LLMs.
  • Propose and evaluate a simple layer-removal pruning method guided by BI.
  • Demonstrate that layer pruning is orthogonal to quantization and can complement other compression methods.
  • Assess the limitations and scope of layer pruning across benchmarks and models.

Proposed method

  • Define Block Influence (BI) to measure how much a layer transforms hidden states during inference.
  • Calibrate BI using hidden states collected from a calibration set and rank layers by BI.
  • Perform layer removal by deleting layers with the smallest BI scores (ascending BI).
  • Evaluate pruned models on standard benchmarks (MMLU, CMMLU, etc.) across multiple open-source LLMs.
  • Compare ShortGPT to state-of-the-art pruning methods and analyze depth vs. width redundancy.
  • Demonstrate orthogonality to quantization by applying pruning to a quantized Llama-2-7B-Base model.

Experimental results

Research questions

  • RQ1Can layer-level redundancy be reliably measured in LLMs using a layer-wise BI metric?
  • RQ2How much performance is preserved when removing low-BI layers across different models and tasks?
  • RQ3Is layer pruning predominantly depth-based or width-based in current LLM architectures?
  • RQ4Does BI-guided layer removal complement quantization techniques to further reduce footprint?

Key findings

  • LLMs exhibit substantial layer-level redundancy, especially in deeper layers.
  • BI (Block Influence) effectively captures layer importance and guides pruning.
  • ShortGPT maintains around 92% of performance while reducing approximately 25% of parameters and computation, outperforming prior pruning methods.
  • Layer removal (depth pruning) tends to outperform width reduction methods like embedding-dimension pruning.
  • The pruning approach is orthogonal to quantization and can be combined with it for further compression.
  • Redundancy is observed across Transformer-based models and even non-Transformer architectures like RWKV.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.