arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.12649cs.LGcs.AI
收藏

FW-Merging:利用 Frank-Wolfe 优化扩展模型合并

FW-Merging: Scaling Model Merging with Frank-Wolfe Optimization

Imperial College London, UK(伦敦帝国学院);Samsung AI Center, Cambridge, UK(三星AI研究中心)

Hao Mark Chen, Shell Xu Hu, Wayne Luk, Timothy Hospedales, Hongxiang Fan

AI总结:

本文提出 FW-Merging,将模型合并建模为约束优化并用 Frank-Wolfe 迭代选择与局部更新,实现多来源、大规模检查点合并,在 20 个 ViT 模型上显著优于现有方法且内存恒定。

摘要:

模型合并已成为多任务学习(MTL)中一种很有前景的方法,为传统微调提供了一种数据高效的替代方案。然而,随着开源 AI 生态系统的快速发展以及微调基础模型的日益丰富,现有模型合并方法面临两个关键局限:(i)它们主要为内部微调模型设计,因此难以适应模型与任务信息部分未知的多样化模型来源;(ii)在合并大量模型检查点时,它们难以有效扩展。为应对这些挑战,我们将模型合并表述为一个约束优化问题,并提出一种新方法:Frank-Wolfe Merging(FW-Merging)。受 Frank-Wolfe 优化启发,我们的方法在模型池中迭代选择最相关的模型,以最小化目标函数的线性近似,随后执行类似 Frank-Wolfe 更新的局部合并。目标函数旨在捕捉目标合并模型的期望行为,而微调候选模型定义约束集。更重要的是,FW-Merging 是现有合并方法的一种正交技术,可与它们无缝集成,以进一步提升准确率性能。实验表明,FW-Merging 可跨多样化模型来源扩展:在 20 个 CV 任务上,面对 16 个无关模型时保持稳定,加入 16 个相关模型时提升 15.3%,同时保持恒定内存开销,而不像数据知情合并方法那样产生线性开销。与最先进方法相比,在合并 20 个 ViT 模型时,FW-Merging 比无数据合并方法高出 32.8%,并比数据知情的 Adamerging 高出 8.39%。我们的代码已在 github.com/hmarkc/FW-Merging 开源。

英文摘要:

Model merging has emerged as a promising approach for multi-task learning (MTL), offering a data-efficient alternative to conventional fine-tuning. However, with the rapid development of the open-source AI ecosystem and the increasing availability of fine-tuned foundation models, existing model merging methods face two key limitations: (i) They are primarily designed for in-house fine-tuned models, making them less adaptable to diverse model sources with partially unknown model and task information, (ii) They struggle to scale effectively when merging numerous model checkpoints. To address these challenges, we formulate model merging as a constrained optimization problem and introduce a novel approach: Frank-Wolfe Merging (FW-Merging). Inspired by Frank-Wolfe optimization, our approach iteratively selects the most relevant model in the pool to minimize a linear approximation of the objective function and then executes a local merging similar to the Frank-Wolfe update. The objective function is designed to capture the desired behavior of the target-merged model, while the fine-tuned candidate models define the constraint set. More importantly, FW-Merging serves as an orthogonal technique for existing merging methods, seamlessly integrating with them to further enhance accuracy performance. Our experiments show that FW-Merging scales across diverse model sources, remaining stable with 16 irrelevant models and improving by 15.3% with 16 relevant models on 20 CV tasks, while maintaining constant memory overhead, unlike the linear overhead of data-informed merging methods. Compared with the state-of-the-art approaches, FW-Merging surpasses the data-free merging method by 32.8% and outperforms the data-informed Adamerging by 8.39% when merging 20 ViT models. Our code is open-sourced at github.com/hmarkc/FW-Merging.

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

↑