MAGIC: Achieving Superior Model Merging via Magnitude Calibration

Yayuan Li, Jian Zhang, Jintao Guo, Zihan Cheng, Lei Qi +2 more
12/22/2025
cs.LGcs.AIcs.CL

Official code: lyymuwu/MAGIC (8 stars, last commit 2026-02-08).

Abstract

The proliferation of pre-trained models has given rise to a wide array of specialised, fine-tuned models. Model merging aims to merge the distinct capabilities of these specialised models into a unified model, requiring minimal or even no additional training. A core objective of model merging is to ensure the merged model retains the behavioural characteristics of the specialised models, typically achieved through feature alignment. We identify that features consist of two critical components: direction and magnitude. Prior research has predominantly focused on directional alignment, while the influence of magnitude remains largely neglected, despite its pronounced vulnerability to perturbations introduced by common merging operations (e.g., parameter fusion and sparsification). Such perturbations to magnitude inevitably lead to feature deviations in the merged model from the specialised models, resulting in subsequent performance degradation. To address this, we propose MAGnItude Calibration (MAGIC), a plug-and-play framework that rectifies layer-wise magnitudes in feature and weight spaces, with three variants. Specifically, our Feature Space Calibration (FSC) realigns the merged model's features using a small set of unlabelled data, while Weight Space Calibration (WSC) extends this calibration to the weight space without requiring additional data. Combining these yields Dual Space Calibration (DSC). Comprehensive experiments demonstrate that MAGIC consistently boosts performance across diverse Computer Vision tasks (+4.3% on eight datasets) and NLP tasks (+8.0% on Llama) without additional training. Our code is available at: https://github.com/lyymuwu/MAGIC

View on arXivView PDF

Code Implementations(1)

lyymuwu/MAGICOfficial100%

MAGIC is a training-free, plug-and-play post-merging calibration framework that improves merged models by calibrating layer-wise magnitudes (in feature space, weight space, or both).

80PythonDec 16, 20258 months ago

Similar Papers

Cite this paper

@article{li2025magic,
  title  = {MAGIC: Achieving Superior Model Merging via Magnitude Calibration},
  author = {Yayuan Li and Jian Zhang and Jintao Guo and Zihan Cheng and Lei Qi and Yinghuan Shi and Yang Gao},
  year   = {2025},
  eprint = {2512.19320},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.19320v1}
}

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/2512.19320.svg)](https://codeofpaper.com/paper/2512.19320)

Discussion