arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.01753cs.CV
收藏

无需训练的预训练模型合并

Training-Free Pretrained Model Merging

Zhejiang University(浙江大学);Ningbo Innovation Center, Zhejiang University(浙江大学宁波科创中心);State Grid Shandong Electric Power Company(国网山东省电力公司)

Zhengqi Xu, Ke Yuan, Huiqiong Wang, Yong Wang, Mingli Song, Jie Song

AI总结:

针对现有模型合并需训练或同初始化且权重与激活空间相似性不一致的问题,提出双空间约束下的合并框架MuDSC,通过线性组合相似性矩阵探索置换矩阵,显著提升多任务合并性能。

摘要:

近年来,模型合并技术作为一种将多个单一能力模型组合成单个多能力模型的解决方案而出现。然而,该领域的先前工作要么需要额外的训练或微调过程,要么要求模型具有相同的预训练初始化。在这项工作中,我们指出了先前工作中普遍存在的一个缺陷,即权重空间与激活空间中单元相似性的不一致性。为了解决这种不一致性,我们提出了一种创新的模型合并框架,称为双空间约束下的合并(MuDSC)。具体而言,我们不是仅最大化单一空间的目标,而是提倡在双空间中通过激活相似性矩阵与权重相似性矩阵的线性组合,探索位于具有统一高相似性区域的置换矩阵。为了增强可用性,我们还融入了对组结构的适配,包括多头注意力和组归一化。全面的实验比较表明,MuDSC能够显著提升具有不同任务组合和架构的合并模型的性能。此外,在多任务损失景观中对合并模型的可视化显示,MuDSC使合并模型能够位于重叠区域,每个任务具有统一的较低损失。我们的代码公开于 https://github.com/zju-vipa/training_free_model_merging。

英文摘要:

Recently, model merging techniques have surfaced as a solution to combine multiple single-talent models into a single multi-talent model. However, previous endeavors in this field have either necessitated additional training or fine-tuning processes, or require that the models possess the same pre-trained initialization. In this work, we identify a common drawback in prior works w.r.t. the inconsistency of unit similarity in the weight space and the activation space. To address this inconsistency, we propose an innovative model merging framework, coined as merging under dual-space constraints (MuDSC). Specifically, instead of solely maximizing the objective of a single space, we advocate for the exploration of permutation matrices situated in a region with a unified high similarity in the dual space, achieved through the linear combination of activation and weight similarity matrices. In order to enhance usability, we have also incorporated adaptations for group structure, including Multi-Head Attention and Group Normalization. Comprehensive experimental comparisons demonstrate that MuDSC can significantly boost the performance of merged models with various task combinations and architectures. Furthermore, the visualization of the merged model within the multi-task loss landscape reveals that MuDSC enables the merged model to reside in the overlapping segment, featuring a unified lower loss for each task. Our code is publicly available at https://github.com/zju-vipa/training_free_model_merging.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑