Abstract
Pruning Large Language Models (LLMs) is essential for reducing their massive computational and memory footprints. However, current "one-shot" pruning methods typically rely on greedy heuristics that ignore complex interactions between weights, leading to suboptimal performance. We introduce SparseFW, a method that treats pruning as a continuous optimization problem. By applying the Frank-Wolfe algorithm to a convex relaxation of the pruning mask, SparseFW significantly reduces reconstruction error and improves model performance across various architectures, including LLaMA-3.1 and Qwen-2.5, without the need for expensive retraining.
Introduction
As Large Language Models (LLMs) scale to hundreds of billions of parameters, pruning becomes a critical technique for efficient deployment. Traditional "prune-and-retrain" cycles are no longer feasible at this scale, leading to the rise of "one-shot" layer-wise pruning methods like Wanda and SparseGPT. These methods attempt to find a binary mask that minimizes reconstruction error for each layer. However, finding the optimal mask is an NP-hard combinatorial problem. Existing solutions use greedy heuristics—picking weights based on simple importance scores—which fail to account for how removing one weight affects the importance of its neighbors.
SparseFW: Pruning via Convex Relaxation
SparseFW shifts the pruning paradigm from greedy selection to continuous optimization. The core innovation lies in convex relaxation: instead of forcing mask entries to be strictly binary (0 or 1), they are allowed to vary continuously within the range $[0, 1]$. This transforms the discrete combinatorial problem into a smooth, convex optimization task.
The Frank-Wolfe Algorithm
The relaxed problem is solved using the Frank-Wolfe (FW) algorithm. FW is particularly suited for this task because it is "projection-free," avoiding expensive mapping steps to maintain constraints. Crucially, the algorithm naturally moves toward the "extreme points" of the search space, which correspond to sparse, binary masks. To maintain efficiency at scale, SparseFW precomputes matrix buffers ($G = XX^\top$ and $H = WG$), ensuring that optimization costs depend only on layer dimensions rather than calibration data length.
Hybrid Heuristic
Empirical findings revealed that "pure" optimization can sometimes prune "super-weights" essential for global model stability. To address this, SparseFW employs a hybrid approach: a large fraction (e.g., 90%) of the most important weights are fixed using the Wanda saliency metric, while the remaining 10% are optimized via Frank-Wolfe.
Experimental Results
SparseFW was validated on modern architectures including LLaMA-3.1-8B, Gemma-2-9B, and Qwen-2.5-14B using 128 sequences from the C4 dataset for calibration.
Reconstruction Error and Perplexity
By treating pruning as a holistic optimization problem, SparseFW achieves a dramatic reduction in per-layer reconstruction error—up to 80% compared to the Wanda baseline. This local improvement translates directly to better global performance. For LLaMA-3.1-8B at 60% unstructured sparsity, SparseFW achieved a perplexity of 17.97, significantly outperforming Wanda's 21.53.
Zero-Shot Performance
The method consistently matches or exceeds baselines in zero-shot accuracy. On Qwen2.5-14B at 60% sparsity, SparseFW reached 65.80% accuracy, compared to 63.58% for Wanda. Furthermore, SparseFW is versatile, supporting both unstructured and hardware-friendly N:M semi-structured sparsity.
Discussion and Limitations
While SparseFW provides a significant leap in pruning quality, it highlights a "local-global mismatch": minimizing layer-wise error does not always perfectly align with global model intelligence. This necessitates the hybrid "warmstart" heuristic to protect critical weights. Additionally, SparseFW is more computationally intensive than one-pass greedy methods, requiring approximately 2000 iterations per layer. Future work will focus on better aligning layer-wise objectives with global performance to further refine the pruning process.
Summary updated