All posts
AI & ML

Model Merging: Combining Fine-Tunes Without Retraining

You can take two fine-tuned models and average their weights into one that has both their skills — no training, no GPUs, just arithmetic. It sounds like it should not work, yet it is how much of the open-model leaderboard is built. Here is how merging works.

Dhileep Kumar6 min read
Model Merging: Combining Fine-Tunes Without Retraining

Here is a fact that sounds made up: if you have one model fine-tuned for coding and another fine-tuned for chat, you can literally average their weights together and get a single model that is decent at both — without any training, any data, or any GPUs. It runs in minutes on a CPU. This is model merging, and it is one of the strangest, most useful tricks in the open-model world.

It works because fine-tunes of the same base model live close together in weight space, so blending their parameters tends to blend their behaviors instead of producing noise. Browse the top of any open-model leaderboard and you will find merges everywhere — combinations stitched together from existing fine-tunes rather than trained from scratch.

Why averaging weights even works

The intuition is that fine-tuning nudges a base model only a little. Two fine-tunes of the same base start from the same point and move in different but small directions, so the region between them is usually still meaningful. Average the two and you land somewhere that inherits a bit of each, rather than falling off a cliff into nonsense.

  • Same base, same architecture. Merging only makes sense for models that share parameter names and shapes — usually fine-tunes of one base model.
  • No training required. You operate directly on the weight tensors, so a merge costs memory and a little CPU time, not a training run.
  • It composes skills. Blend a math fine-tune and an instruction fine-tune to get a model that does some of both, cheaply.
  • It is unreasonably effective. Despite sounding like it should break everything, well-chosen merges routinely match or beat their parents on benchmarks.

From averaging to task arithmetic

The simplest merge is a weighted average of two models' parameters. A more powerful idea is task arithmetic: define a task vector as the difference between a fine-tune and its base, which captures what that fine-tuning learned. You can then add task vectors to compose skills, or subtract one to remove a behavior — editing capabilities like vectors.

The catch is interference: when two task vectors disagree on a parameter, naive averaging can cancel both out. Methods like TIES and DARE handle this by trimming and reconciling conflicting changes before merging, which is why they often beat plain averaging when combining several models.

A merge, in code

At its core, a linear merge is exactly the one-line idea it sounds like — a weighted sum of the two parameter sets:

python
# Model merging: average the weights of two fine-tunes into one — no GPUs, no training.
import torch

def merge(model_a, model_b, weight=0.5):
    merged = {}
    for k in model_a:                       # same base, so identical parameter names and shapes
        merged[k] = weight * model_a[k] + (1 - weight) * model_b[k]   # blend the weights
    return merged

# Task arithmetic goes further: a "task vector" is fine-tune minus base; add or subtract
# those vectors to compose or remove skills. Tools like mergekit do this at scale.

Real tooling like mergekit wraps this with SLERP, TIES, DARE, and per-layer recipes, but the heart of it is what you see here: arithmetic on weights, no gradient descent in sight.

Fine-tuning teaches a model with data and gradients. Merging skips both — it just adds models together, betting that nearby skills blend instead of clash. Astonishingly often, the bet pays.

Using merging well

  • Merge from one base. The models must descend from the same base architecture; mismatched lineages produce garbage, not a blend.
  • Always evaluate the result. A merge can also underperform both parents, so treat each one as a hypothesis to test, not a guaranteed upgrade.
  • Use TIES or DARE for several models. When combining more than two, interference grows; conflict-resolving merge methods beat plain averaging.
  • Tune the weights. The blend ratio (and per-layer weighting) is a dial — sweep it and measure, rather than assuming an even split is best.
  • It is cheap, so experiment. Because merges cost minutes not GPU-days, you can try many recipes and keep the one that evaluates best.

The bottom line

Model merging lets you combine the skills of multiple fine-tunes into one model through arithmetic on weights — no training run, no GPUs, just a blend of parameters from the same base. With task vectors and conflict-aware methods like TIES and DARE, you can compose and even subtract capabilities, and tools like mergekit make it routine.

It will not replace fine-tuning, but it is a remarkably cheap way to build a capable specialist out of parts you already have. Pick models from a shared base, merge, evaluate, and keep what wins — capability assembly at the cost of a coffee break.

Share

Enjoyed this?

Get the next deep dive in your inbox. No spam — just the stories worth reading.

Subscribe to the newsletter

Comments