Mergenetic: a Simple Evolutionary Model Merging Library

Adrian Robert Minut, Tommaso Mencattini, Andrea Santilli, Donato Crisostomi, Emanuele Rodolà
5/16/2025
cs.LGcs.AIcs.NE

No official code found. Best implementation: tommasomncttn/mergenetic (107 stars, Apache-2.0, last commit 2025-08-08).

Abstract

Model merging allows combining the capabilities of existing models into a new one - post hoc, without additional training. This has made it increasingly popular thanks to its low cost and the availability of libraries that support merging on consumer GPUs. Recent work shows that pairing merging with evolutionary algorithms can boost performance, but no framework currently supports flexible experimentation with such strategies in language models. We introduce Mergenetic, an open-source library for evolutionary model merging. Mergenetic enables easy composition of merging methods and evolutionary algorithms while incorporating lightweight fitness estimators to reduce evaluation costs. We describe its design and demonstrate that Mergenetic produces competitive results across tasks and languages using modest hardware.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Flexible library for merging large language models (LLMs) via evolutionary optimization (ACL 2025 Demo).

1076Shell, PythonFeb 8, 20251 years agoApache-2.0
evolutionary-algorithmsllmmodel-merging

Cite this paper

@article{minut2025mergenetic,
  title  = {Mergenetic: a Simple Evolutionary Model Merging Library},
  author = {Adrian Robert Minut and Tommaso Mencattini and Andrea Santilli and Donato Crisostomi and Emanuele Rodolà},
  year   = {2025},
  eprint = {2505.11427},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.11427v1}
}

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

Discussion