Introduction
The deployment of Large Language Models (LLMs) is constrained by significant computational and memory requirements. Pruning techniques, particularly semi-structured (N:M) sparsity, offer a promising path toward hardware-accelerated inference. Specifically, 2:4 sparsity—where two out of every four consecutive weights are zeroed—is supported by modern NVIDIA architectures (Ampere and Hopper) to provide a theoretical 2x speedup.
Traditional pruning methods like Wanda and SparseGPT utilize "one-shot" local heuristics, making pruning decisions based on individual layer statistics or weight magnitudes. However, these methods fail to account for global dependencies across the model's depth. We present ProxSparse, a framework that reformulates mask selection as a global, learnable optimization problem, significantly outperforming existing heuristics.
Methodology
ProxSparse shifts the pruning paradigm from rigid sorting to a continuous learning process.
Regularized Optimization and "Wiggling Room"
Instead of applying a hard constraint immediately, ProxSparse introduces a regularization term to the loss function that encourages weights to conform to a 2:4 sparse pattern. By employing Proximal Gradient Descent, the model maintains "wiggling room" during the early stages of optimization. This allows the mask to evolve based on end-to-end feedback from a calibration dataset, enabling the algorithm to "reconsider" weight importance as the global feature landscape shifts.
The EnumALM Solver
A primary challenge in global mask optimization is the computational cost of the proximal operator for N:M sparsity. To address this, we developed EnumALM (Alternating Minimization). EnumALM is a specialized solver that is 10x faster than standard gradient-based approaches and 100x faster than traditional interior-point methods. This efficiency allows ProxSparse to scale to models with tens of billions of parameters without requiring the massive resources typical of full-model retraining.
Sensitivity to Regularization
The effectiveness of the pruning process is highly dependent on the regularization parameter $\lambda_1$. As shown in the following figure, a balanced $\lambda_1$ ensures that the model reaches the target sparsity while maintaining performance, whereas insufficient or excessive regularization leads to suboptimal masks.
Experimental Results
ProxSparse was evaluated across multiple model families, including Llama 2/3, Mistral, Qwen, and OpenLlama, using the C4 dataset for calibration and Wikitext for perplexity (PPL) measurement.
Language Modeling and Reasoning
On the Llama-2-7b architecture, ProxSparse achieved a perplexity of 8.51, representing a 35% improvement over Wanda (11.42). In zero-shot reasoning tasks (e.g., ARC, HellaSwag, PIQA), ProxSparse demonstrated substantial gains. For Mistral-v0.1-7B, the average accuracy reached 52.7%, a 20% relative improvement over Wanda's 44.1%.
Efficiency and Deployment
Beyond accuracy, ProxSparse delivers tangible performance benefits. Using the NVIDIA CUTLASS library, we observed a 1.26x end-to-end wall-clock speedup on Mistral-v0.3-7b. Additionally, the pruned models exhibited a reduction in peak memory footprint ranging from 29.5% to 37.3%.
Conclusion
ProxSparse demonstrates that global optimization for LLM pruning is not only feasible but superior to local heuristics. By treating mask selection as a learning problem and utilizing the efficient EnumALM solver, ProxSparse preserves model performance at high sparsity levels, paving the way for more efficient deployment of massive pretrained models.
Summary updated