Merging by Matching Models in Task Parameter Subspaces
Abstract
Model merging aims to cheaply combine individual task-specific models into a single multitask model. In this work, we view past merging methods as leveraging different notions of a ''task parameter subspace'' in which models are matched before being merged. We connect the task parameter subspace of a given model to its loss landscape and formalize how this approach to model merging can be seen as solving a linear system of equations. While past work has generally been limited to linear systems that have a closed-form solution, we consider using the conjugate gradient method to find a solution. We show that using the conjugate gradient method can outperform closed-form solutions, enables merging via linear systems that are otherwise intractable to solve, and flexibly allows choosing from a wide variety of initializations and estimates for the ''task parameter subspace''. We ultimately demonstrate that our merging framework called ''Matching Models in their Task Parameter Subspace'' (MATS) achieves state-of-the-art results in multitask and intermediate-task model merging. We release all of the code and checkpoints used in our work.
Cite
Text
Tam et al. "Merging by Matching Models in Task Parameter Subspaces." Transactions on Machine Learning Research, 2024.Markdown
[Tam et al. "Merging by Matching Models in Task Parameter Subspaces." Transactions on Machine Learning Research, 2024.](https://mlanthology.org/tmlr/2024/tam2024tmlr-merging/)BibTeX
@article{tam2024tmlr-merging,
title = {{Merging by Matching Models in Task Parameter Subspaces}},
author = {Tam, Derek and Bansal, Mohit and Raffel, Colin},
journal = {Transactions on Machine Learning Research},
year = {2024},
url = {https://mlanthology.org/tmlr/2024/tam2024tmlr-merging/}
}