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

通过权重集成专家混合合并多任务模型

Merging Multi-Task Models via Weight-Ensembling Mixture of Experts

National Engineering Research Center for Multimedia Software(国家多媒体软件工程技术研究中心);School of Computer Science, Wuhan University(武汉大学计算机学院);Hubei Luojia Laboratory(湖北珞珈实验室);Sun Yat-sen University(中山大学);JD Explore Academy(京东探索研究院);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Nanyang Technological University(南洋理工大学)

Anke Tang, Li Shen, Yong Luo, Nan Yin, Lefei Zhang, Dacheng Tao

AI总结:

本文提出将 Transformer 的 MLP 升级为权重集成 MoE 模块,通过动态整合共享与任务特定知识来缓解参数干扰,实现多任务模型的有效合并。

摘要:

将在不同任务上训练的各种基于 Transformer 的任务特定模型合并为一个统一模型,可以同时执行所有任务。以任务算术为代表的先前方法已被证明既有效又可扩展。现有方法主要侧重于在原始模型参数空间内寻找静态最优解。一个显著的挑战是缓解不同模型参数之间的干扰,这种干扰会严重降低性能。在本文中,我们提出合并大部分参数,同时将 Transformer 层的 MLP 升级为权重集成专家混合(MoE)模块,该模块可以根据输入动态整合共享知识和任务特定知识,从而提供一种更灵活的解决方案,能够适应每个实例的特定需求。我们的关键见解是,通过识别并分离共享知识与任务特定知识,然后动态整合它们,可以在很大程度上缓解参数干扰问题。我们进行了常规的多任务模型合并实验,并评估了我们方法的泛化性和鲁棒性。结果证明了我们方法的有效性,并提供了对我们方法的全面理解。代码可在 https://github.com/tanganke/weight-ensembling_MoE 获取。

英文摘要:

Merging various task-specific Transformer-based models trained on different tasks into a single unified model can execute all the tasks concurrently. Previous methods, exemplified by task arithmetic, have been proven to be both effective and scalable. Existing methods have primarily focused on seeking a static optimal solution within the original model parameter space. A notable challenge is mitigating the interference between parameters of different models, which can substantially deteriorate performance. In this paper, we propose to merge most of the parameters while upscaling the MLP of the Transformer layers to a weight-ensembling mixture of experts (MoE) module, which can dynamically integrate shared and task-specific knowledge based on the input, thereby providing a more flexible solution that can adapt to the specific needs of each instance. Our key insight is that by identifying and separating shared knowledge and task-specific knowledge, and then dynamically integrating them, we can mitigate the parameter interference problem to a great extent. We conduct the conventional multi-task model merging experiments and evaluate the generalization and robustness of our method. The results demonstrate the effectiveness of our method and provide a comprehensive understanding of our method. The code is available at https://github.com/tanganke/weight-ensembling_MoE

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

↑