Merging Text Transformer Models from Different Initializations

Neha Verma, Maha Elbayad
3/1/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: nverma1/merging-text-transformers (20 stars, MIT, last commit 2025-02-02).

Abstract

Recent work on permutation-based model merging has shown impressive low- or zero-barrier mode connectivity between models from completely different initializations. However, this line of work has not yet extended to the Transformer architecture, despite its dominant popularity in the language domain. Therefore, in this work, we investigate the extent to which separate Transformer minima learn similar features, and propose a model merging technique to investigate the relationship between these minima in the loss landscape. The specifics of the architecture, like its residual connections, multi-headed attention, and discrete, sequential input, require specific interventions in order to compute model permutations that remain within the same functional equivalence class. In merging these models with our method, we consistently find lower loss barriers between minima compared to model averaging, across models trained on a masked-language modeling task or fine-tuned on a language understanding benchmark. Our results show that the minima of these models are less sharp and isolated than previously understood, and provide a basis for future work on merging separately trained Transformer models.

View on arXivView PDF

Code Implementations(1)

MIT

Code for "Merging Text Transformers from Different Initializations"

201Shell, PythonMar 5, 20241 years agoMIT

Similar Papers

Cite this paper

@article{verma2024merging,
  title  = {Merging Text Transformer Models from Different Initializations},
  author = {Neha Verma and Maha Elbayad},
  year   = {2024},
  eprint = {2403.00986},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.00986v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.00986.svg)](https://codeofpaper.com/paper/2403.00986)

Discussion