TL;DR
SLEB is a novel, training-free pruning technique for Large Language Models (LLMs) that accelerates inference by statically dropping entire, redundant transformer blocks. By iteratively identifying and removing the blocks that least impact final token prediction, SLEB achieves direct, proportional speedups across all batch sizes while maintaining higher accuracy and lower perplexity than existing weight-level pruning methods.
What Problem Does This Paper Address?
LLMs are incredibly powerful but massively resource-intensive, making real-world deployment expensive. To fix this, researchers use pruning—removing parts of the model to make it smaller and faster. However, existing pruning methods have major practical flaws:
- Unstructured/Structured Weight Pruning (e.g., SparseGPT, Wanda): Removing individual weights or enforcing 2:4 sparsity often fails to deliver actual speedups on modern GPUs unless you have very specific hardware and large batch sizes.
- Channel-wise Pruning (e.g., SliceGPT): Removing rows/columns of weights helps with speed but often severely degrades the model's language capabilities unless followed by expensive fine-tuning.
- Early Exit (Dynamic Skipping): These methods dynamically skip blocks based on the input. While great for single-batch inference, they break down in multi-batch settings (common in production) because the GPU has to wait for the token that requires the longest processing path.
The authors needed a way to achieve guaranteed, hardware-agnostic speedups in multi-batch scenarios without destroying the model's intelligence or requiring massive retraining compute.
Methods
The authors observed block-level redundancy in LLMs: because of the residual stream architecture, the outputs of neighboring transformer blocks are highly similar. SLEB (Streamlining LLMs by Eliminating Blocks) capitalizes on this by removing entire transformer blocks.
The core challenge is which blocks to remove. If you just chop out consecutive blocks, the model's perplexity skyrockets. SLEB solves this using a clever, training-free algorithm:
- Iterative Evaluation: SLEB doesn't pick all blocks to drop at once. It evaluates the model, finds the single most redundant block, and removes it.
- Dynamic Significance: Once a block is removed, the importance of the remaining blocks changes. SLEB recalculates the redundancy of the remaining blocks in the newly pruned model before picking the next one to drop.
- Prediction-based Metric: Instead of just looking at how much a block changes the hidden states (which can amplify errors later in the network), SLEB measures redundancy by looking at how much removing a block alters the final token prediction of the network.
This process is done using a tiny calibration dataset and requires zero backpropagation or fine-tuning.
Datasets
- Calibration Dataset: 128 sequences randomly sampled from the WikiText-2 training set.
- Language Modeling Evaluation: WikiText-2 and C4 validation datasets.
- Zero-Shot Task Evaluation: PIQA, WinoGrande, HellaSwag, ARC-easy, and ARC-challenge (evaluated via the LM Evaluation Harness).
Key Insights and Ideas
- Macro over Micro: You don't need to surgically remove individual weights to compress an LLM. The models are robust enough that you can amputate entire transformer blocks, provided you carefully calculate the network-wide impact of that amputation.
- The "Moving Target" of Redundancy: The paper proves that the significance of a transformer block is not static. If you determine Block 5 and Block 6 are both highly redundant in the base model, removing Block 5 might suddenly make Block 6 critical. Iterative pruning is essential.
- Calibration Robustness: Methods like SliceGPT rely heavily on the activation patterns of the calibration data, meaning if the evaluation data looks different, performance tanks. Because SLEB evaluates the impact on the entire network's final output, it is highly robust to changes in the calibration dataset.
- Guaranteed Speedups: Because SLEB removes whole blocks, the speedup is strictly proportional to the pruning ratio. Removing 20% of the blocks guarantees roughly a 20% reduction in compute, regardless of batch size or GPU architecture.
Key Results
The authors tested SLEB on the OPT (6.7B to 66B) and LLaMA-2 (7B to 70B) model families.
- Inference Speed: On a LLaMA-2-70B model, pruning 20% of the blocks with SLEB improved token generation throughput from 299 tokens/s to 381 tokens/s (a 1.27x speedup). Competing methods like SparseGPT and Wanda showed no throughput improvement (0.98x) under the same batch conditions.
- Perplexity & Accuracy: At 10% and 20% sparsity, SLEB consistently outperformed SparseGPT, Wanda, and SliceGPT. For example, on LLaMA-2-7B (20% sparsity), SLEB maintained an average zero-shot accuracy of 56.80%, compared to SliceGPT's 55.49%.
- Quantization Compatibility: SLEB stacks perfectly with Post-Training Quantization. The authors applied 4-bit AWQ to SLEB-pruned models and found almost zero additional degradation in perplexity, allowing for massive memory and compute savings.
Limitations and Future Work
- Coarse Granularity: Because SLEB operates at the block level, you can only prune in large chunks (e.g., removing 1 out of 32 blocks is an immediate ~3% sparsity jump).
- High Sparsity Degradation: The paper shows that while SLEB is dominant at 10% and 20% sparsity, pushing it to extreme levels (e.g., 40-50% block removal) causes performance to drop off significantly. Fine-grained weight pruning might still be necessary for extreme compression.
- Future Work: While SLEB is designed to be training-free, the authors show in the appendix that applying a lightweight LoRA fine-tuning pass after SLEB pruning recovers even more performance. Integrating efficient fine-tuning pipelines into the SLEB workflow is a clear next step for deployment.
Summary updated