One-Shot Sensitivity-Aware Mixed Sparsity Pruning for Large Language Models

Hang Shao, Bei Liu, Yanmin Qian

Introduction

Large Language Models (LLMs) such as the LLaMA family have revolutionized natural language processing but pose significant deployment challenges due to their immense memory requirements and inference latency. While model pruning—the removal of redundant weights—offers a solution, existing methods face two primary obstacles. First, traditional pruning often necessitates expensive retraining or fine-tuning to recover performance. Second, current "one-shot" methods typically apply uniform sparsity across all layers, failing to account for the varying importance of different model components.

Methodology: MixGPT

To address these challenges, we introduce MixGPT, a one-shot pruning framework that adaptively allocates sparsity based on layer-wise sensitivity.

Improved Saliency Criterion (ISC)

MixGPT utilizes an Improved Saliency Criterion to identify specific weights for removal. By integrating the Optimal Brain Surgeon (OBS) and Optimal Brain Damage (OBD) approaches, the ISC provides a precise importance score. This score considers both the immediate error introduced by weight removal and the capacity of adjacent weights to compensate for that error.

Hessian Sensitivity-Aware Mixed Sparsity

Rather than applying a uniform pruning ratio, MixGPT calculates the sensitivity of each layer using the average trace of the Hessian matrix. To overcome the computational impossibility of calculating a full Hessian for LLMs, the framework employs the Hutchinson algorithm, an efficient stochastic estimation method. Layers exhibiting high sensitivity are pruned less aggressively, while more robust layers undergo higher pruning, maintaining a target average sparsity (e.g., 50%) across the entire model.

Experimental Setup

The method was evaluated using 128 segments from the C4 dataset for calibration. Performance was measured via:

  • Language Modeling Perplexity: Evaluated on WikiText2, PTB, and C4.
  • Zero-Shot Downstream Tasks: Benchmarked on ARC-Challenge, HellaSwag, TruthfulQA, and PIQA.

Key Insights and Results

Layer-wise Sensitivity Patterns

Analysis reveals a distinct "U-shape" in layer sensitivity across various models. The initial layers (embedding processing) and final layers (output generation) are significantly more sensitive to pruning than the middle layers.

Sensitivity of different LLM layers, showing a characteristic U-shape where initial and final layers are more sensitive.

Performance at High Sparsity

MixGPT consistently outperforms uniform-sparsity methods like SparseGPT. On LLaMA-13B, MixGPT achieved a WikiText2 perplexity of 5.68, compared to 6.12 for SparseGPT. The advantages are most pronounced at extreme sparsity levels (70-80%), where MixGPT prevents the model collapse typically seen with uniform pruning.

Perplexity on PTB vs. Sparsity, demonstrating that MixGPT (Ours) maintains performance better than SparseGPT at high sparsity levels.

Zero-Shot Accuracy and Quantization

In downstream tasks, MixGPT shows superior reasoning capabilities. For LLaMA2-13B, it reached an average score of 60.8% across tasks, surpassing SparseGPT's 58.8%. Furthermore, MixGPT is compatible with quantization techniques. Combining 50% sparsity with 4-bit GPTQ quantization yields an 8x compression ratio with minimal performance degradation.

Conclusion and Future Work

MixGPT demonstrates that sensitivity-aware mixed sparsity is a powerful tool for one-shot LLM compression. While calculating Hessian traces for large models is computationally demanding, the performance gains—especially at high sparsity—are substantial. Future research will explore scaling this analysis to models exceeding 70B parameters and integrating mixed-precision quantization for further efficiency.

Summary updated

BibTeX
@inproceedings{shao2023one,
  author = {Hang Shao and Bei Liu and Yanmin Qian},
  title = {{One-Shot Sensitivity-Aware Mixed Sparsity Pruning for Large Language Models}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=jInWhG3D1r},
}
Figure