From Layers to Submodules: Rethinking Granularity in Replacement-Based LLM Compression

Elia Cunegatti, Marcus Vukojevic, Erik Nielsen, Giovanni Iacca
6/1/2026
cs.CLcs.AI

Official code: eliacunegatti/SubFit (2 stars, Apache-2.0, last commit 2026-05-30).

Abstract

Post-training compression of Large Language Models (LLMs) removes entire architectural components, either deleting them or replacing them with fitted modules. Existing replacement-based methods share two design constraints: full-layer granularity and contiguous selection. We argue that this is overly restrictive: in fact, redundancy in pretrained transformers is not confined to contiguous regions, nor does it evenly distribute between Attention and FeedForward outputs, implying that different strategies best approximate different submodule types and that removable components need not cluster within contiguous depth ranges. Based on this intuition, we introduce SubFit (Submodule-level Fitted residual replacement), which compresses LLMs at the submodule level: Attention and FeedForward submodules are selected non-contiguously, and each receives its own lightweight fitted residual bypass. SubFit operates post-training and requires only calibration data. Across ten LLMs (five base, five instruction-tuned), five sparsity levels from 12.5% to 37.5%, and four replacement-based baselines, SubFit achieves the best aggregate perplexity-accuracy trade-off across the evaluated sparsity levels, with larger gains under aggressive compression. At 25% sparsity, it retains 84.6% of dense downstream accuracy and incurs 2.42x perplexity degradation, against 81.6% and 4.34x for the strongest baselines, while delivering measurable inference speedup and KV-cache savings. Code is available at https://github.com/eliacunegatti/SubFit.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Official Implementation of "From Layers to Submodules: Rethinking Granularity in Replacement-Based LLM Compression"

20May 24, 20264 months agoApache-2.0

Similar Papers

Cite this paper

@article{cunegatti2026from,
  title  = {From Layers to Submodules: Rethinking Granularity in Replacement-Based LLM Compression},
  author = {Elia Cunegatti and Marcus Vukojevic and Erik Nielsen and Giovanni Iacca},
  year   = {2026},
  eprint = {2606.02559},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.02559v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.02559.svg)](https://codeofpaper.com/paper/2606.02559)

Discussion