Streamlining Redundant Layers to Compress Large Language Models
About
This paper introduces LLM-Streamline, a pioneer work on layer pruning for large language models (LLMs). It is based on the observation that different layers have varying impacts on hidden states, enabling the identification of less important layers to be pruned.LLM-Streamline comprises two parts: layer pruning, which removes consecutive layers with the lowest importance based on target sparsity, and layer replacement, a novel module that trains a lightweight network to replace the pruned layers to mitigate performance loss. Additionally, a new metric called stability is proposed to address the limitations of the widely used accuracy metric in evaluating model compression. Experiments show that LLM-Streamline outperforms both previous and concurrent state-of-the-art pruning methods in terms of both performance and training efficiency.Our code is available at https://github.com/RUCKBReasoning/LLM-Streamline
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Commonsense Reasoning | HellaSwag | Accuracy61.2 | 1460 | |
| Physical Commonsense Reasoning | PIQA | Accuracy72 | 329 | |
| Physical Interaction Question Answering | PIQA | Accuracy71.5 | 323 | |
| Boolean Question Answering | BoolQ | Accuracy67.5 | 307 | |
| Reading Comprehension | RACE high | Accuracy38.7 | 295 | |
| Multitask Language Understanding | MMLU | Accuracy45.5 | 206 | |
| Reading Comprehension | RACE mid | Accuracy38 | 196 | |
| Coreference Resolution | WSC | Accuracy43.3 | 96 | |
| Multi-task Language Understanding | MMLU | Accuracy47 | 87 | |
| Reading Comprehension | C3 | Accuracy43.3 | 56 |