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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Tang, Anke, Shen, Li, Luo, Yong, Yin, Nan, Zhang, Lefei, Tao, Dacheng
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913381038948352
author Tang, Anke
Shen, Li
Luo, Yong
Yin, Nan
Zhang, Lefei
Tao, Dacheng
author_facet Tang, Anke
Shen, Li
Luo, Yong
Yin, Nan
Zhang, Lefei
Tao, Dacheng
contents 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
format Preprint
id arxiv_https___arxiv_org_abs_2402_00433
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Merging Multi-Task Models via Weight-Ensembling Mixture of Experts
Tang, Anke
Shen, Li
Luo, Yong
Yin, Nan
Zhang, Lefei
Tao, Dacheng
Machine Learning
Computer Vision and Pattern Recognition
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
title Merging Multi-Task Models via Weight-Ensembling Mixture of Experts
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2402.00433