ALPS: Improved Optimization for Highly Sparse One-Shot Pruning for Large Language Models

Xiang Meng, Kayhan Behdin, Haoyue Wang, Rahul Mazumder

TL;DR

This paper introduces ALPS, an optimization-based framework for one-shot pruning of Large Language Models (LLMs). ALPS tackles the challenge of compressing massive LLMs by using an operator splitting technique and a novel post-processing step, achieving significant improvements in model performance and sparsity compared to existing heuristic methods.

What Problem Does This Paper Address?

Large Language Models (LLMs) have revolutionized NLP, but their immense size leads to substantial computational and storage costs. One-shot pruning aims to reduce these costs by removing redundant weights without retraining. However, current one-shot pruning methods for LLMs often rely on heuristics due to their scale, which can lead to suboptimal compression. This paper addresses this gap by proposing an optimization-based framework, ALPS, that can effectively prune LLMs at high sparsity levels while maintaining performance.

Methods

ALPS is an optimization-based framework for one-shot LLM pruning. Its core components are:

  • Operator Splitting (ADMM): ALPS formulates pruning as an $\ell_0$-constrained optimization problem and solves it using the Alternating Direction Method of Multipliers (ADMM). This technique decomposes the problem into more manageable subproblems, allowing simultaneous optimization of both the weight values and the sparsity pattern (i.e., which weights to keep).
  • Novel Penalty Parameter Update Scheme: To balance support quality and convergence speed, ALPS employs a dynamic penalty parameter update scheme that gradually increases the parameter as the support stabilizes.
  • Preconditioned Conjugate Gradient (PCG) Post-processing: After the sparsity pattern (support) is determined, ALPS uses a modified PCG method with GPU parallelism and vectorization to efficiently solve for the optimal weights within that support. This step refines the pruned weights to minimize reconstruction error.

Datasets

The paper evaluates ALPS on several standard LLM benchmarks:

  • Training/Calibration Data: C4 dataset (128 segments of 2048 tokens each).
  • Evaluation Datasets:
    • Perplexity: WikiText2, PTB (Penn Treebank), C4.
  • Zero-shot Benchmarks: MMLU, PIQA, LAMBADA, ARC-Easy, ARC-Challenge.

The paper does not introduce new benchmarks.

Key Insights and Ideas

  • Optimization over Heuristics: The paper demonstrates that an optimization-based approach, like ALPS, can outperform heuristic methods for LLM pruning, especially at high sparsity levels. This is because optimization directly targets the pruning objective, leading to better-quality sparse structures.
  • ADMM for $\ell_0$ Constraints: Applying ADMM to the non-convex and non-continuous $\ell_0$-constrained optimization problem for pruning is a novel contribution, providing theoretical convergence guarantees.
  • PCG for Efficient Refinement: Using PCG with GPU acceleration and vectorization for the post-processing step significantly speeds up the process of finding optimal weights on a fixed support, outperforming traditional backsolve methods.
  • Support Quality Matters: The paper emphasizes that the quality of the sparsity pattern (support) is crucial. ALPS's ability to find a high-quality support directly contributes to its superior performance.

Key Results

  • Perplexity Reduction: On the LLaMA3-8B model with 70% sparsity, ALPS achieved a 29% reduction in test perplexity on the WikiText dataset compared to existing methods.
  • Zero-shot Performance Improvement: ALPS showed an 8% improvement in zero-shot benchmark performance on the LLaMA3-8B model at 70% sparsity.
  • Reconstruction Error: ALPS consistently achieved lower reconstruction errors on single layers compared to methods like SparseGPT and Wanda, especially at high sparsity levels (e.g., 7.6% error at 80% sparsity for ALPS vs. 12% for SparseGPT).
  • Speedup: The PCG post-processing step achieved a 20x-200x speedup compared to optimal backsolve methods.
  • N:M Sparsity: ALPS also showed improved performance on N:M sparsity patterns, handling the increased complexity more effectively than heuristics.

Limitations and Future Work

  • Runtime: While ALPS achieves better performance, its runtime is longer compared to some heuristic methods (as shown in Table 6). However, the authors note that this runtime is still negligible compared to fine-tuning methods.
  • High Sparsity Degradation: The paper acknowledges that performance can degrade at very high sparsity levels, suggesting that one-shot pruning might need to be combined with fine-tuning or prompting techniques for practical applications.
  • Future Work: The authors suggest extending ALPS to incorporate structured pruning constraints and quantization, and further exploring the strengths and scope of their optimization-based approach.

Summary updated

BibTeX
@inproceedings{meng2024alps,
  author = {Xiang Meng and Kayhan Behdin and Haoyue Wang and Rahul Mazumder},
  title = {{ALPS: Improved Optimization for Highly Sparse One-Shot Pruning for Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=0lBx844upd},
}
Figure