ShortGPT: Layers in Large Language Models are More Redundant Than You Expect
Authors:
Preprint
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.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- A Survey on Model Compression for Large Language ModelsTransactions of the Association for Computational Linguistics, 2024
- LaCo: Large Language Model Pruning via Layer Collapse2024
- CMMLU: Measuring massive multitask language understanding in Chinese2024
- LoRAPrune: Structured Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning2024
- RoFormer: Enhanced transformer with Rotary Position EmbeddingNeurocomputing, 2023
- RWKV: Reinventing RNNs for the Transformer Era2023
- Investigating Prior Knowledge for Challenging Chinese Machine Reading ComprehensionTransactions of the Association for Computational Linguistics, 2020
- Analyzing Redundancy in Pretrained Transformer Models2020
- CoQA: A Conversational Question Answering ChallengeTransactions of the Association for Computational Linguistics, 2019
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding2019