TL;DR
GRASPrune is a highly efficient structured pruning framework that compresses Large Language Models (LLMs) by jointly pruning FFN channels and KV head groups under a single global budget. By enforcing budget constraints directly inside the optimization loop using a projected straight-through estimator (STE), it can slice a model like LLaMA-2-7B in half in just 6 minutes on a single GPU while maintaining excellent language modeling and downstream task accuracy.
What Problem Does This Paper Address?
Serving Large Language Models (LLMs) is notoriously expensive. Beyond the massive parameter counts that dictate memory requirements, the Key-Value (KV) cache grows linearly with sequence length, creating severe memory and latency bottlenecks during inference.
Structured pruning—deleting entire channels or attention heads—is a powerful way to create smaller, faster dense models that run on standard serving stacks. However, existing methods typically suffer from three main flaws:
- Siloed Pruning: They prune FFN channels and KV head groups independently, ignoring the fact that they compete for the same deployment memory budget.
- Rigid Schedules: They rely on hard-coded, per-layer sparsity schedules rather than letting the data dictate global allocation.
- Decoupled Optimization: They use a "score first, select later" approach, learning importance scores without constraints and applying the budget post-hoc. This mismatch often leads to sub-optimal architectures once the hard budget is finally enforced.
Methods
GRASPrune introduces a unified post-training pruning pipeline that operates under a single global resource budget:
- Global Budgeted Formulation: FFN intermediate channels and KV head groups across all layers are pooled together. They compete globally based on a parameter-count cost proxy.
- Projected Straight-Through Estimator (STE): Instead of unconstrained score learning, GRASPrune enforces budget feasibility at every single optimization step. The backbone weights remain frozen while the framework learns lightweight continuous scalar gates. During the forward pass, a
PROJECToperator sorts units by their utility score and applies a hard binary mask that strictly satisfies the budget. During the backward pass, gradients flow through the soft probabilities using an STE surrogate. - Scale Re-normalization: Pruning inherently causes layer-wise distribution shifts. To fix this scale mismatch, GRASPrune freezes the final mask and runs a quick calibration step to learn scalar multipliers ($\gamma$) solely for the retained units. These factors are then folded directly into the weights, ensuring zero extra parameter or inference overhead.
The overall pipeline is illustrated below:
Datasets
- Calibration: 512 unlabeled sequences of length 512 sampled from the training split of WikiText-2.
- Evaluation: Language modeling perplexity (PPL) is measured on WikiText-2, PTB, and C4. Downstream zero-shot performance is evaluated across five standard benchmarks: ARC-challenge, ARC-easy, HellaSwag, PIQA, and WinoGrande. Appendix evaluations also include GSM8K, MMLU, BoolQ, and SciQ.
Key Insights and Ideas
- Constraint-Aware Learning is Essential: The core "aha moment" is that importance scores must be learned under budget pressure. If scores are learned unconstrained and then post-hoc ranked by a cost-normalized criterion ($p/c$), the allocation shifts heavily toward cheaper units (FFN channels), drastically reducing KV capacity and tanking model quality.
- Global Competition Prevents Collapse: Allowing FFN and KV structures to compete globally across all layers prevents the optimization from collapsing into a single structure type, adapting naturally to the model's layer-wise sensitivity.
- Dual Benefits of KV Pruning: Pruning KV head groups provides a dual advantage: it reduces parameter count and scales down the KV cache size near-proportionally, directly lowering the context-length-dependent memory growth.
Key Results
- Superior High-Sparsity Stability: At 50% parameter retention on LLaMA-2-7B, GRASPrune achieves a WikiText-2 perplexity of 12.18, significantly outperforming baselines like FLAP (24.80) and SliceGPT (26.10). At an aggressive 40% retention stress test, GRASPrune remains remarkably stable (16.65 PPL) while baselines degrade sharply.
- Practical Throughput Gains: The pruned dense checkpoints translate directly into real-world serving benefits, demonstrating substantial end-to-end throughput improvements, particularly at larger batch sizes.
- Extreme Efficiency: Because it only optimizes scalar gates on a small calibration set, the entire pruning process for a 7B model finishes in roughly 6 minutes on a single NVIDIA A100 GPU.
Limitations and Future Work
- Proxy Alignment: The framework relies on parameter count as a proxy for the global budget, which may not perfectly map to specific hardware latency or memory bandwidth profiles.
- Evaluation Scope: The authors did not evaluate the pruned models on instruction-following, dialogue safety, coding, or multilingual benchmarks.
- Scale Limits: While the method generalizes well to newer model families like LLaMA-3.1 and Qwen3 up to 14B parameters, validation on massive scales (>70B parameters) remains an open direction.
Summary updated