What matters in AI.

Subscribe

Learn / AI basics

Definition · AI basics

Model merging

Model merging is a method that puts the weights of two or more models together into one model, with no more training. Usually the models are fine-tuned copies of one base model. The merged model can keep skills from each source model. It costs no more to use than one of them.

Last reviewed

Key points

  • Model merging does arithmetic on weights. It does not train on data, and it can operate on a CPU.
  • It works best when all source models come from one base model. Then their weights stay in one low error region.
  • Frequent methods: weight averaging (model soups), task arithmetic, TIES-Merging and DARE. MergeKit makes them easy to use.
  • The merge does not check what it takes. Research shows one backdoored or misaligned source model can give its fault to the merged model.
  • For security teams, a merged model has many parents. Each parent is part of the supply chain.

How model merging works

Model merging works on the numbers in the models, not on data. Most methods start from one base model and some fine-tuned copies of it.

  1. Find the change. For each copy, subtract the base weights from the fine-tuned weights. Ilharco and colleagues name this difference a “task vector”.
  2. Clean the change. Remove small values. TIES-Merging resets small changes. DARE can drop “90% or even 99%” of them.
  3. Mix. Add or average the changes. TIES-Merging also keeps only the values that agree in sign.
  4. Add back. Put the mixed change on the base model.
Model merging: the change of each fine-tuned model is mixed and added to the shared base model.
Model merging: the change of each fine-tuned model is mixed and added to the shared base model.

Four frequent methods

Method Year What it does
Model soups 2022 Averages the weights of models fine-tuned with different hyperparameters
Task arithmetic 2022 Adds or subtracts task vectors to add or remove a skill
TIES-Merging 2023 Sets small changes to zero and settles sign differences
DARE 2023 Drops most of each change at random and scales up the remaining values

Wortsman and colleagues tell why a simple average can work. Fine-tuned models “often appear to lie in a single low error basin”. Their best ViT-G soup got 90.94% top-1 accuracy on ImageNet (2022).

Why model merging is important

Model merging gives new models at a low cost. The MergeKit README says that a merge can operate “entirely on CPU”. The DARE authors merge “without retraining or GPUs”.

  • Builders get one model with some skills and no more cost at use.
  • The open model community uses it frequently. The MergeKit paper (March 2024) says “thousands of models have been merged”.
  • Security teams get a new risk. A merged model takes weights from many parents, and the merge does not check them.

In practice

Three results are important for a team that uses or ships merged open-weight models:

  1. Misalignment spreads. Hammoud and colleagues (2024) found that current merge methods often overlook safety alignment, “leading to highly misaligned models”.
  2. Safe parts can make a dangerous merged model. Li and colleagues (2026) made source models that “remain individually benign but produce severely misaligned models when merged”. They tested 9 LLMs from 3 model families.
  3. Tests on the parents are not sufficient. Test the merged model for model alignment and backdoors on its own.

Look at each parent model as part of the AI supply chain. Record the parents, their versions and the merge method. Then you can find the provenance of the result.

Software can also find merges automatically. The Evolutionary Model Merge method of Sakana AI (2024) used evolutionary algorithms. It made “a Japanese LLM with Math reasoning capabilities”.

Trade-offs

  • One base is necessary. The MergeKit README says that methods “require matching tensor shapes”. Git Re-Basin (2022) aligned independently trained ResNet models on CIFAR-10. Merges of language models usually use one base.
  • Interference. Two models can change one weight in opposite directions. TIES-Merging names “disagreement on the sign” as one cause.
  • Weak parents. The soup increase came “only when all individual models achieve high accuracy”, Wortsman and colleagues report.
  • Leaderboard scores. A DARE merge was first in its size (7B) on the Open LLM Leaderboard at the time of the paper. A high score does not show that the model is safe.

Questions and answers

What is the difference between model merging and an ensemble?

An ensemble keeps all the models and uses each one on each input. Thus the cost increases with each model. Model merging makes one set of weights before use. Wortsman and colleagues show that their model soups add no inference or memory cost.

Can a merged model be safe if each source model is safe?

Not always. Hammoud and colleagues (2024) found that merge methods that overlook safety alignment can give highly misaligned models. Li and colleagues (2026) made source models that are each benign but give a severely misaligned merged model. Test the merged model, not only its parents.

Can you merge two models with different architectures?

Not with the usual tools. The MergeKit README says that merge methods "require matching tensor shapes". Git Re-Basin aligns independently trained networks first. Merges of large language models usually start from one base model.

Sources

  1. TIES-Merging: Resolving Interference When Merging ModelsarXiv (Yadav et al.), 2 Jun 2023
  2. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timearXiv (Wortsman et al.), 10 Mar 2022
  3. Model soups (full text, sections 3.3.1 and 6)arXiv (Wortsman et al.), 10 Mar 2022
  4. Editing Models with Task ArithmeticarXiv (Ilharco et al.), 8 Dec 2022
  5. Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free LuncharXiv (Yu et al., ICML 2024), 6 Nov 2023
  6. Arcee's MergeKit: A Toolkit for Merging Large Language ModelsarXiv (Goddard et al.), 20 Mar 2024
  7. mergekit (GitHub README)Arcee AI
  8. Evolutionary Optimization of Model Merging RecipesarXiv (Akiba et al., Sakana AI; Nature Machine Intelligence 2025), 19 Mar 2024
  9. Git Re-Basin: Merging Models modulo Permutation SymmetriesarXiv (Ainsworth et al., ICLR 2023), 11 Sep 2022
  10. BadMerging: Backdoor Attacks Against Model MergingarXiv (Zhang et al.), 14 Aug 2024
  11. Model Merging and Safety Alignment: One Bad Model Spoils the BuncharXiv (Hammoud et al.), 20 Jun 2024
  12. When Safe Models Merge into Danger: Exploiting Latent Vulnerabilities in LLM FusionarXiv (Li et al.), 1 Apr 2026

Guides that use this term