MAGIC: 通过幅度校准实现卓越的模型合并
MAGIC: Achieving Superior Model Merging via Magnitude Calibration
AI总结:
MAGIC通过校正特征和权重空间的幅度,提升模型合并性能,无需额外训练。
摘要:
预训练模型的普及催生了大量专门的、微调过的模型。模型合并旨在将这些专门模型的独立能力合并成一个统一的模型,需要最小甚至不需要额外训练。模型合并的核心目标是确保合并后的模型保留专门模型的行为特征,通常通过特征对齐来实现。我们发现特征由两个关键组成部分组成:方向和幅度。先前的研究主要集中在方向对齐上,而幅度的影响仍被忽视,尽管其对常见合并操作(如参数融合和稀疏化)引入的扰动具有显著的脆弱性。这些对幅度的扰动不可避免地导致合并模型中的特征偏离专门模型,从而导致后续性能下降。为此,我们提出了MAGnItude Calibration(MAGIC),一个即插即用的框架,用于校正特征和权重空间中的层级幅度,有三个变种。具体而言,我们的特征空间校正(FSC)利用一小部分无标签数据重新对齐合并模型的特征,而权重空间校正(WSC)将这种校正扩展到权重空间,无需额外数据。结合这些方法得到双空间校正(DSC)。全面的实验表明,MAGIC在多种计算机视觉任务(八个数据集上+4.3%)和NLP任务(Llama上+8.0%)中一致提升了性能,而无需额外训练。我们的代码可在:https://github.com/lyymuwu/MAGIC上获得。
英文摘要:
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
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。