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


翻译:预训练模型的激增催生了大量专业化的微调模型。模型融合旨在将这些专业化模型的独特能力整合到一个统一模型中,且需要极少甚至无需额外训练。模型融合的一个核心目标是确保融合后的模型保留专业化模型的行为特征,这通常通过特征对齐来实现。我们发现特征包含两个关键组成部分:方向和幅度。先前的研究主要集中于方向对齐,而幅度的影响在很大程度上被忽视,尽管幅度对常见融合操作(例如参数融合与稀疏化)引入的扰动表现出明显的脆弱性。这种对幅度的扰动不可避免地导致融合模型中的特征偏离专业化模型,进而造成性能下降。为解决此问题,我们提出了幅度校准(MAGIC),一个即插即用的框架,可在特征空间和权重空间中对逐层幅度进行校正,并提供三种变体。具体而言,我们的特征空间校准(FSC)使用少量未标注数据重新对齐融合模型的特征,而权重空间校准(WSC)则将此校准扩展到权重空间,且无需额外数据。结合两者即得到双空间校准(DSC)。全面的实验表明,MAGIC 在无需额外训练的情况下,持续提升了多种计算机视觉任务(在八个数据集上提升+4.3%)和自然语言处理任务(在 Llama 上提升+8.0%)的性能。我们的代码位于:https://github.com/lyymuwu/MAGIC

0
下载
关闭预览

相关内容

UTC: 用于视觉对话的任务间对比学习的统一Transformer
专知会员服务
14+阅读 · 2022年5月4日
误差反向传播——CNN
统计学习与视觉计算组
30+阅读 · 2018年7月12日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员