Choose Your Model Size: Any Compression of Large Language Models Without Re-Computation

Martin Genzel, Patrick Putzky, Pengfei Zhao, Sebastian Schulze, Mattes Mollenhauer, Robert Seidel, Stefan Dietzel, Thomas Wollmann

TL;DR

ACIP (Any Compression via Iterative Pruning) allows researchers to calibrate a large language model once and then instantly "dial in" any desired compression level without further training. By combining SVD-reparametrization with a novel global importance map, ACIP provides a smooth, predictable size-performance trade-off that outperforms existing state-of-the-art factorization methods.

What Problem Does This Paper Address?

Deploying Large Language Models (LLMs) on edge devices like smartphones or automotive systems is notoriously difficult due to their massive memory and compute requirements. While post-training compression (like pruning or quantization) helps, it usually follows a "guess-and-check" cycle: you pick a target size, run an expensive calibration process, and hope the performance is acceptable. If it isn't, you have to start over.

Existing methods often rely on "preset" compression rates (e.g., 4-bit quantization or specific sparsity patterns). The authors identify two major hurdles:

  1. Discrete targets: Most methods can't hit an arbitrary memory budget (e.g., exactly 5.2 GB).
  2. Re-computation costs: Exploring the trade-off between model size and accuracy requires repeating expensive optimization runs for every single target size.

Methods

ACIP introduces a "compute once, compress dynamically" workflow. The process consists of three main steps:

  1. Model Reparametrization: The authors decompose linear layers using Singular Value Decomposition (SVD), representing weights as $W \approx U \Sigma V^\top$. They also add a low-rank adapter (LoRA) $\Delta$ to each layer to help recover performance lost during pruning.
  2. Scoring via Iterative Pruning: This is the core innovation. Instead of picking a target size upfront, they run a single optimization pass using a sparsity-inducing $\ell_1$ penalty on the singular values. As the penalty increases, singular values are gradually "pushed" to zero. The order in which these values vanish is recorded to create a global score map.
  3. Any Compression: Once the score map exists, materializing a model of any size is trivial. You simply look at the global ranking and prune the least important singular values across the entire model until you hit your exact target budget.
Figure 1: Compared to conventional compression algorithms (a), an Any Compression algorithm (b) swaps the computational calibration step and the decision step, so that models of different target sizes can be materialized without re-computation.

Datasets

  • Calibration/Pruning: The authors used a subset of the C4 (Colossal Clean Crawled Corpus) dataset.
  • Evaluation: Performance was measured using perplexity on C4 and WikiText-2 validation sets.
  • Downstream Tasks: Seven zero-shot tasks from the EleutherAI LM Evaluation Harness were used, including ARC (Challenge and Easy), HellaSwag, MathQA, OpenBookQA, PIQA, and Winogrande.

Key Insights and Ideas

  • Workflow Inversion: By moving the "Choose size" step after the "Compute" step, ACIP enables practitioners to dynamically adjust model size in near real-time (under 1 second) based on available hardware resources.
  • Global vs. Local Importance: Rather than using heuristics to decide how much to prune each layer, ACIP lets the data-driven optimization process determine global importance. This naturally handles non-uniform pruning patterns where some layers are more compressible than others.
  • Predictable Scaling: The resulting trade-off curves are remarkably smooth, resembling the "scaling laws" seen in model training. This allows users to predict how a model will perform at a given size before actually materializing it.
  • Quantization Synergy: ACIP is complementary to quantization. You can use ACIP to reduce the rank of the model and then apply 4-bit quantization to the remaining weights for massive cumulative memory savings.
Figure 3: The shrinkage behavior of mask parameters during optimization provides a natural ranking for the score map.

Key Results

  • State-of-the-Art Performance: On LLaMA-7B, ACIP consistently outperformed baselines like ASVD and SVD-LLM. For instance, at a 60% compression rate, ACIP achieved an average zero-shot accuracy of 0.45, compared to 0.37 for SVD-LLM.
  • Efficiency: The one-time calibration for a LLaMA-7B model takes less than 30 minutes on a single NVIDIA H100 GPU.
  • Robustness: The method was validated across multiple model families, including LLaMA (1, 2, and 3.1), Mistral, and Qwen2.5, showing consistent results across different architectures.
Figure 4: Perplexity trade-off curves for various LLMs show smooth and consistent performance degradation as size decreases.

Limitations and Future Work

  • Memory Overhead during Calibration: Because ACIP uses backpropagation through the entire model to generate the score map, it requires more GPU memory during the calibration phase than layer-wise methods like SVD-LLM.
  • Model Scaling: The study focused on models up to 14B parameters that fit on a single H100. The authors note that scaling ACIP to 30B+ models remains an area for future exploration.
  • Inference Speed: While the parameter count is reduced, achieving actual wall-clock speedups requires optimized kernels for low-rank matrix multiplications, which the authors suggest as a topic for further study.

Summary updated

Abstract

The adoption of Foundation Models in resource-constrained environments remains challenging due to their large size and inference costs. A promising way to overcome these limitations is post-training compression, which aims to balance reduced model size against performance degradation. This work presents Any Compression via Iterative Pruning (ACIP), a novel algorithmic approach to determine a compression-performance trade-off from a single stochastic gradient descent run. To achieve parameter efficiency, we use an SVD-reparametrization of linear layers and iteratively prune their singular values with a sparsity-inducing penalty. Importantly, the pruning order of the parameters is used to derive a global score map that allows compressing a model to any target size without re-computation. We evaluate ACIP on a large selection of open-weight LLMs and downstream tasks, demonstrating state-of-the-art results compared to existing factorization-based compression methods. We also show that ACIP seamlessly complements common quantization-based compression techniques.
BibTeX
@article{genzel2025choose,
  author = {Martin Genzel and Patrick Putzky and Pengfei Zhao and Sebastian Schulze and Mattes Mollenhauer and Robert Seidel and Stefan Dietzel and Thomas Wollmann},
  title = {{Choose Your Model Size: Any Compression of Large Language Models Without Re-Computation}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=Y6hdYf8tsg},
}
Figure