TL;DR
Shrinking Large Language Models (LLMs) usually means pruning redundant weights and quantizing the rest into low-bit formats, yet doing these one after the other leaves accuracy on the table because rounding weights shifts which ones actually matter. This paper introduces Quantization-aware One-shot Pruning (QOP), a mathematical framework that unifies pruning and quantization into a single discrete optimization problem—delivering much sharper compressed models in a single pass, with zero retraining required.
What Problem Does This Paper Address?
To fit massive LLMs onto edge devices without expensive retraining, engineers rely on two main tricks: one-shot pruning (deleting less useful weights using a tiny calibration dataset) and quantization (snapping continuous 16-bit weights onto a coarse grid of discrete 4-bit or 8-bit values).
Historically, optimization-based pruning algorithms assume weights are continuous variables that can be smoothly nudged. Quantization shatters that continuity. As a result, standard workflows treat them as a decoupled, two-step pipeline: prune the full-precision model first, then quantize what survives. Because the pruning step is blind to the rounding errors coming down the pipeline, it deletes weights that become crucial after discretization, trapping the compressed model in a suboptimal state.
Methods
Instead of a sequential pipeline, the authors formulate layer-wise compression as a unified sparse-constrained discrete optimization problem. The objective minimizes layer output reconstruction error while forcing weights to simultaneously obey a sparsity budget ($\ell_0$ norm) and belong to a discrete set of quantized values.
Solving an NP-hard combinatorial problem at LLM scale sounds intractable, so the authors extend the Alternating Direction Method of Multipliers (ADMM)—a classic divide-and-conquer optimization backbone:
- Standard backbone, new engine: While ADMM has been used for continuous pruning (like ALPS), QOP introduces an auxiliary variable that absorbs both the sparsity and discreteness constraints simultaneously, splitting the gnarly joint problem into alternating updates with fast, closed-form solutions.
- Joint Projection Operator: Instead of picking weights via a simple magnitude-based top-$k$ rule, QOP derives a novel projection step that evaluates the combined error of snapping a weight to its nearest discrete quantization level versus setting it to zero.
- Theoretical Guarantees: By introducing an infinitesimal continuous perturbation ($\epsilon \to 0^+$) to relax the discrete space, the authors prove via the Kurdyka-Łojasiewicz (KŁ) property that QOP globally converges to a stationary feasible point.
Datasets
Because QOP is a retraining-free, one-shot method, no training datasets are introduced; it only requires a small calibration sample from The Pile (with C4 and WikiText-2 tested in ablations and baseline comparisons).
Evaluations span standard language modeling perplexity benchmarks (WikiText-2, C4, The Pile, RedPajama) and zero-shot reasoning tasks (WinoGrande, ARC-Challenge, ARC-Easy, PiQA, plus HellaSwag and BoolQ when comparing against unified baselines).
Key Insights and Ideas
- Quantization-induced importance shifts are massive: When the authors ran a diagnostic test on Llama-2-7B (50% sparsity) comparing pruning masks generated before and after FP16-to-INT4 quantization, 13.48% of the selected weights changed across self-attention layers. What looks disposable in 16-bit might be load-bearing in 4-bit.
- Format agnosticism for free: Because QOP’s discreteness constraint is defined over an arbitrary set $C$, switching from uniform 4-bit integers (INT4) to non-uniform 8-bit floating-point (FP8 E4M3) requires zero changes to the optimization theory—you just swap out the nearest-neighbor lookup in the projection step.
- Taming compounding layer errors: In layer-wise pruning, tiny reconstruction errors snowball as data flows deeper into the network. By actively updating discrete weight values alongside the sparsity mask, QOP keeps block-by-block Mean Squared Error (MSE) noticeably flatter than decoupled baselines.
Key Results
Tested on ~7B-scale models (Llama-2-7B, Llama-7B, OPT-6.7B) across 50%–70% unstructured sparsity, QOP consistently beats decoupled pipelines (Magnitude, Wanda, SparseGPT, ALPS) and unified baselines (OBR):
- Llama-2-7B (W4A16): At 50% sparsity, QOP achieves an average perplexity of 7.26 (nearly matching the dense quantized model's 7.15, and beating ALPS at 8.03 and Wanda at 8.76) alongside 57.45% zero-shot accuracy. At 70% sparsity, where Wanda's perplexity explodes past 100, QOP holds steady at 20.02 (vs. SparseGPT's 30.68).
- Harsh Activation Quantization (W4A8): On OPT-6.7B at 60% sparsity, integer activation quantization causes severe degradation in baselines—ALPS drops to 31.25 average perplexity and SparseGPT hits 56.72. QOP slashes that perplexity down to 16.96 and boosts zero-shot accuracy by over 4 percentage points above ALPS (51.20% vs. 47.05%).
- Extreme Low-Bit (W4A4KV4): Against the unified baseline OBR_GPTQ on Llama-2-7B (50% sparsity), QOP lowers WikiText-2 perplexity from 8.49 to 7.76 and lifts average zero-shot accuracy from 58.38% to 58.96%.
Limitations and Future Work
While the main text focuses on unstructured sparsity on ~7B language models and relies on a slight mathematical perturbation ($\epsilon$) to establish continuous convergence proofs for an inherently discrete NP-hard problem, explicit practical limitations (such as hardware-friendly structured sparsity constraints) are not discussed in detail in the main body. For future work, the authors plan to extend QOP's discrete optimization framework beyond standard text transformers to multimodal architectures and inherently discrete spiking neural networks.
Summary updated