Lineage-aware model merging

Is your merge base the right one?

Model merging adds up each model's change from a base model that you type by hand. If the models share a closer ancestor, its training gets added again and again, and the merge breaks. This page checks the base using the model weights alone.

Base = their closest common ancestor (Instruct)
68.0 / 48.0
GSM8K / MBPP accuracy, %
Base = Qwen2.5-1.5B (the usual choice)
6.5 / 0.0
GSM8K / MBPP accuracy, %

Three Qwen2.5-1.5B-Instruct fine-tunes (QwQ, MBPP, Business) merged with Task Arithmetic. Only the base differs.

Try the Base Checker

Runs in your browser on real data from the 7 models below (196 weight matrices each, measured on Kaggle). No data, no GPU. Pick a preset or build your own merge.

models to merge, with weight

What we measured

Qwen2.5-1.5B family on a Kaggle T4. Accuracy is the average of GSM8K and MBPP (first 200 test questions each). 42 merges in total; full tables on GitHub.

Choosing the right base fixes Task Arithmetic merges

Same models and method; only the base changes. Lineage base wins 5 of 5.

Base = closest common ancestor (Instruct)Base = Qwen2.5-1.5B
Show as table

The wrong base makes task vectors look alike

Cosine between two models' changes. Near 1: the same ancestor update counted twice.

From InstructFrom Qwen2.5-1.5B
Show as table

How far is too far

Stepping from Instruct towards Coder: healthy up to 10%, then it breaks.

Show as table

How it works

Everything comes from the weight files. No test questions are used at any step.

Measure distanceHow much two models' weights differ, averaged over 196 attention and MLP matrices.
Draw the family treeJoin the closest relatives first (minimum spanning tree), following MoTHer (ICLR 2025).
Find the ancestorOn the tree paths between the models you merge, pick the model closest to all of them.
Check double countingCosine between the models' changes from your base. High means a shared update is repeated.
Distance gateIf even the best base is more than 10% away from a model, the merge is unsafe from any base.