arXiv:2501.00061cs.LGcs.AI2025-01被引 4

无需训练即可合并结构不同的模型,提升多任务融合效率。

Training-free Heterogeneous Model Merging

  • 通过分层对齐策略解决深度差异问题,将深层模型分段处理。
  • 提出弹性神经元压缩算法,实现宽度不一模型的权重空间对齐。
  • 在视觉与NLP任务中均达到与同构合并相当的效果,适合跨架构模型整合。

模型合并作为高效复用模型的强大范式,可将特定任务模型整合为具备多能力的统一框架。现有方法如权重平均(WA)虽能利用预训练模型而无需重新训练,但模型间固有的异构性(尤其在架构差异下)限制了其应用。为此,我们提出一种面向异构模型的无训练合并框架,涵盖深度与宽度异构。针对深度异构,设计层对齐策略:将深层模型按表示相似性分段,使不同层数模型无缝合并;针对宽度异构,提出弹性神经元压缩算法,将不同宽度模型的权重映射至同一维度空间,避免宽度一致要求。大量实验验证其有效性,异构模型合并性能可媲美同构合并,在视觉与自然语言处理任务上表现优异。代码已公开于 https://github.com/zju-vipa/training_free_heterogeneous_model_merging。

原文摘要 · Abstract (English)

Model merging has attracted significant attention as a powerful paradigm for model reuse, facilitating the integration of task-specific models into a singular, versatile framework endowed with multifarious capabilities. Previous studies, predominantly utilizing methods such as Weight Average (WA), have shown that model merging can effectively leverage pretrained models without the need for laborious retraining. However, the inherent heterogeneity among models poses a substantial constraint on its applicability, particularly when confronted with discrepancies in model architectures. To overcome this challenge, we propose an innovative model merging framework designed for heterogeneous models, encompassing both depth and width heterogeneity. To address depth heterogeneity, we introduce a layer alignment strategy that harmonizes model layers by segmenting deeper models, treating consecutive layers with similar representations as a cohesive segment, thus enabling the seamless merging of models with differing layer depths. For width heterogeneity, we propose a novel elastic neuron zipping algorithm that projects the weights from models of varying widths onto a common dimensional space, eliminating the need for identical widths. Extensive experiments validate the efficacy of these proposed methods, demonstrating that the merging of structurally heterogeneous models can achieve performance levels comparable to those of homogeneous merging, across both vision and NLP tasks. Our code is publicly available at https://github.com/zju-vipa/training_free_heterogeneous_model_merging.

模型合并异构模型无训练深度学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。