做 LLM 部署优化的团队终于有了更精细的压缩工具——SubFit 在 25% 稀疏度下精度损失比最强基线少一半,且非连续子模块选择更贴合真实冗余分布,建议做模型量化和剪枝的开发者直接试。
现有 LLM 后训练压缩方法将整个层替换为轻量模块,但受限于全层粒度和连续选择。SubFit 提出子模块级替换,允许非连续地选择 Attention 和 FeedForward 子模块,并为每个子模块独立学习残差旁路。实验覆盖 10 个 LLM(5 个基础、5 个指令微调)和 5 个稀疏度(12.5%-37.5%),在 25% 稀疏度下,SubFit 保留 84.6% 下游精度(最强基线 81.6%),困惑度仅退化 2.42 倍(基线 4.34 倍)。该方法仅需校准数据,可带来推理加速和 KV 缓存节省。代码已开源。
From Layers to Submodules: Rethinking Granularity in Replacement-Based LLM Compression
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.