IrekoGPT: Turning Structured Pruning into Post-Hoc Slimmable LLMs

Pietro Moriello, Pietro Buzzega, Angelo Porrello, Simone CalderaraarXiv 2026

TL;DR

IREKOGPT is a post-hoc method that transforms standard, pretrained Large Language Models (LLMs) into "slimmable" variants—models that can dynamically adjust their width at inference time to fit varying hardware constraints. By expanding the calibration process to account for multiple compression ratios and applying a ridge-regression correction, the authors achieve performance that rivals specialized, fixed-size pruned models while maintaining the flexibility of a single, multi-width checkpoint.

What Problem Does This Paper Address?

Deploying LLMs on edge devices (like phones or embedded systems) is challenging because resource availability isn't static. A phone might have plenty of RAM one moment but enter a low-power mode the next.

Standard structured pruning creates a smaller, faster model, but it’s "frozen" at a specific target size (e.g., 70% of the original). If you want five different sizes, you have to store five different models. Slimmable networks solve this by allowing one model to operate at multiple widths, but they typically require expensive training from scratch. IREKOGPT addresses the gap of how to take an already trained foundation model and make it slimmable without retraining, while avoiding the performance degradation caused by "distributional shifts"—where pruning one layer messes up the input for the next.

Methods

IREKOGPT builds on SliceGPT, a method that uses Principal Component Analysis (PCA) to identify and remove less important weight dimensions. The authors introduce three key innovations:

  1. From Slicing to Slimming: Instead of physically deleting columns from the PCA-transformed weight matrices, they retain the full matrices. Because PCA columns are ordered by importance (eigenvalues), they can simply truncate the projection at runtime to achieve different widths. This creates "nested" subnetworks.
  2. Expanded Calibration Dataset (ECD): In standard pruning, each layer is calibrated based on the output of the full-width previous layer. IREKOGPT instead runs multiple parallel "streams" at different compression ratios (e.g., 10%, 20%, 30% sparsity) during calibration. The PCA for the next layer is then computed using a concatenation of all these different activation distributions, making the model robust to any width chosen at inference.
  3. Ridge-Based Correction: Some layers in a Transformer (like the Value projection) keep their output dimension even if their input is slimmed. The authors use gradient-free ridge regression to slightly adjust these weights. The goal is to make the output of the "slimmed" layer match the original "full-width" output as closely as possible, using the original model as a reference signal.

Datasets

  • Calibration: 128 sequences (2048 tokens each) sampled from the WikiText-2 training set.
  • Evaluation: Language modeling performance was measured via perplexity on the WikiText-2 test set.
  • Models Tested: Llama-2-7B, Llama-3.1-8B, Llama-3.2-1B, and Qwen3-1.7B.

Key Insights and Ideas

  • PCA as a Natural Slimmer: The authors realized that the ordered nature of PCA eigenvectors is a perfect fit for slimmable architectures. The most important information is always "at the front," allowing for easy truncation.
  • The Multi-Width Bottleneck: A major "aha" moment is that calibrating only on full-width activations leads to a mismatch at inference. By forcing the PCA to see activations from multiple widths simultaneously (ECD), the resulting basis is much more stable across the entire slimming range.
  • Correcting the Drift: Even with good PCA, slimming causes a shift in internal representations. Using a closed-form solution (ridge regression) to "nudge" the weights back toward the original output behavior provides a significant boost, especially at high compression levels.

Key Results

  • Superior Slimming: IREKOGPT consistently outperformed naive PCA-based slimming across all tested models.
  • Closing the Gap: At high compression (e.g., 25-30% sparsity), IREKOGPT often matched or even outperformed SliceGPT, despite SliceGPT being a specialized model optimized for only one specific size.
  • Generalization: The model performed well even at compression ratios it wasn't specifically calibrated for (e.g., 25% and 35%), proving the robustness of the Expanded Calibration Dataset.
  • Representation Alignment: Layer-wise analysis using Mean Squared Error (MSE) and Centered Kernel Alignment (CKA) showed that IREKOGPT’s activations stay much closer to the original model's "ground truth" compared to baselines.

Limitations and Future Work

  • Preliminary Scope: The authors describe these as "preliminary results," suggesting more extensive testing on downstream tasks (beyond perplexity) is needed.
  • Model-Specific Behavior: Interestingly, for the Qwen3-1.7B model, the ECD calibration alone was better than the full method (ECD + Ridge Correction), suggesting the ridge correction might need tuning for different architectures.
  • VRAM Usage: While the method is post-hoc and efficient, running multiple parallel streams during calibration increases memory requirements during the conversion process (though not at inference).
  • Future Directions: The authors suggest exploring how this method scales to even larger models and different types of layers beyond the value projection.

Summary updated

Abstract

We introduce IrekoGPT, a post-hoc method for converting pretrained LLMs into slimmable models whose width can be adjusted at inference time. Building on SliceGPT, we retain its projection matrices without pruning them, allowing a single model to expose nested subnetworks at different widths. We improve robustness by calibrating each layer across multiple compression ratios, and correct downstream linear layers through gradient-free ridge regression. Across Llama and Qwen models, preliminary results show improvements over naive PCA-based slimming, with the largest gains at high compression. Code is available at https://github.com/aimagelab/IrekoGPT
BibTeX
@misc{moriello2026irekogpt,
  author = {Pietro Moriello and Pietro Buzzega and Angelo Porrello and Simone Calderara},
  title = {{IrekoGPT: Turning Structured Pruning into Post-Hoc Slimmable LLMs}},
  year = {2026},
  eprint = {2610.00426},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.00426},
}
Figure