[Paper Review] Everybody Prune Now: Structured Pruning of LLMs with only Forward Passes
Bonsai is a gradient-free, forward-pass-only structured pruning method for LLMs that enables memory-constrained pruning, delivering fast, compact models with competitive accuracy and speedups compared to gradient-based and semi-structured pruning. It can produce sub-2B models with strong performance using a single A6000 GPU.
Structured pruning is a promising approach to create smaller, faster large language models. However, existing methods typically rely on computing the gradient via backward passes, which can inflate memory requirements and compute costs. In this work we introduce Bonsai, a gradient-free structured pruning method that eliminates the need for backpropagation, significantly reducing memory requirements and compute costs while achieving state-of-the-art pruning performance. Bonsai uses forward-pass-only perturbative pruning to enable efficient compression of large models on a broader range of hardware configurations. Unlike existing structured pruning approaches, Bonsai not only achieves better compression with fewer resources but also produces models that are twice as fast as those generated by semi-structured pruning. As a concrete demonstration, we use Bonsai to prune 7B and 8B models to 50% sparsity on a single A6000 GPU -- a task challenging for backprop-based methods in memory-constrained settings, as they require 2-3x the memory. Our results show that removing backprop as a requirement not only enables pruning larger models on constrained hardware but can also lead to state-of-the-art efficiency and performance.
Motivation & Objective
- Democratize access to large language models by enabling pruning with only forward passes under typical consumer hardware memory limits.
- Develop a memory-friendly structured pruning method that avoids backpropagation and training-time gradient requirements.
- Estimate module importances perturbatively via sub-model evaluations to select pruning opportunities globally across layers.
- Show that forward-pass pruning can outperform gradient-based and semi-structured pruning under constrained resources.
Proposed method
- Formulate structured pruning as selecting subsets of non-overlapping modules under a memory constraint.
- Estimate module relevance by generating and evaluating a small number of sub-models and solving a regression to recover module importances.
- Use informative priors derived from unstructured pruning metrics to bias sub-model sampling.
- Compute module relevance with a global, not layer-local, perspective to avoid local optima.
- Iteratively prune with smaller steps (p_iter) and re-estimate priors at each step.
- Optionally apply post-pruning adaptation with distillation and LoRA finetuning to recover performance.
Experimental results
Research questions
- RQ1Can structured pruning of LLMs be achieved using only forward passes, within realistic memory budgets?
- RQ2How can we efficiently estimate module importance for pruning when gradient-based optimization is infeasible?
- RQ3Do global (not layer-wise) pruning decisions yield better accuracy-speed trade-offs under memory constraints?
- RQ4Is it possible to attain competitive performance with sub-2B models produced from larger architectures on standard benchmarks?
Key findings
- Bonsai achieves competitive perplexity and up to 1.58x end-to-end speedup over the parent model under forward-pass pruning.
- Bonsai outperforms state-of-the-art gradient-based structured pruning methods (LLM-Pruner, LoRAPrune) on 4 of 6 evaluation settings.
- A pruned ~3B Phi-2 model to ~1.8B with Bonsai attains leading performance on 4 of 6 tasks on the Huggingface Open LLM leaderboard at the time of submission.
- Post-pruning adaptation with LoRA and distillation can recover and even surpass some baseline performance, with Bonsai-pruned models achieving strong zero-shot abilities on multiple tasks.
- Using forward-pass pruning, Bonsai can produce a model that matches the target size in accuracy while achieving notable speedups, offering a practical path for memory-constrained practitioners.
- Ablation studies show that both perturbative evaluation and regression-based importance estimation are essential for Bonsai’s effectiveness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.