Exploring Model Kinship for Merging Large Language Models

Yedi Hu, Yunzhi Yao, Ningyu Zhang, Huajun Chen, Shumin Deng
10/16/2024
cs.CLcs.AIcs.CV

Official code: zjunlp/ModelKinship (28 stars, MIT, last commit 2025-04-16).

Abstract

Model merging has emerged as a key technique for enhancing the capabilities and efficiency of Large Language Models (LLMs). The open-source community has driven model evolution by iteratively merging existing models, yet a principled understanding of the gains and underlying factors in model merging remains limited. In this work, we study model evolution through iterative merging, drawing an analogy to biological evolution, and introduce the concept of model kinship, the degree of similarity or relatedness between LLMs. Through comprehensive empirical analysis, we show that model kinship is closely linked to the performance improvements achieved by merging, providing a useful criterion for selecting candidate models. Building on this insight, we propose a new model merging strategy: Top-k Greedy Merging with Model Kinship, which can improve benchmark performance. Specifically, we discover that incorporating model kinship as a guiding criterion enables continuous merging while mitigating performance degradation caused by local optima, thereby facilitating more effective model evolution. Code is available at https://github.com/zjunlp/ModelKinship.

View on arXivView PDF

Code Implementations(1)

MIT

Exploring Model Kinship for Merging Large Language Models

283Python, Jupyter NotebookMay 19, 20241 years agoMIT
artificial-intelligencekinshipknowledge-fusionlarge-language-modelsmerging+3 more

Similar Papers

Cite this paper

@article{hu2024exploring,
  title  = {Exploring Model Kinship for Merging Large Language Models},
  author = {Yedi Hu and Yunzhi Yao and Ningyu Zhang and Huajun Chen and Shumin Deng},
  year   = {2024},
  eprint = {2410.12613},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.12613v3}
}

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/2410.12613.svg)](https://codeofpaper.com/paper/2410.12613)

Discussion