Introduction
We are given a released language model, a target checkpoint, and domain specialists that may have been fine-tuned from different points in the checkpoint lineage. We must produce one model with the target architecture that retains the specialists' abilities while preserving the target's general behaviour. The central difficulty is that a specialist weight difference is meaningful only relative to the checkpoint from which that specialist was trained. Treating every specialist as if it had been trained from the target can reintroduce an update the target already contains, or cancel an update that the target needs.
Weight averaging and task arithmetic provide simple data-free starting points [1, 2]. TIES addresses interference among task updates [3], while localization, Fisher weighting, and dataless weight fusion use different signals to retain useful coordinates [4, 5, 6]. These approaches generally assume a common reference or do not use the full checkpoint lineage. Our question is therefore how to transport each update from the checkpoint that actually produced it, remove the part already present in the target, and combine the residual skills without adding modules or a router.
Method
We call the method LTPMS, for lineage-transported, redundancy-projected model soup. It is a data-free merge: the implementation reads the target and expert weights and the parent link for each expert, but does not use calibration examples, activations, gradients, or evaluation data.
Transport along the recorded lineage
Let denote the target and the recorded parent of expert . For each ordinary parameter key, we define the transported task vector
This differs from the flat difference . If an expert was trained from an earlier checkpoint, a flat difference from the target would include the changes made between that checkpoint and the target; measuring from the expert's own parent keeps that inherited history separate from the new skill.
def merge(lineage: "Lineage", ctx: "MergeContext") -> Dict[str, torch.Tensor]:
"""Lineage-transported, redundancy-projected model soup.
The specialists are not all fine-tuned from the target: some descend from the
pretrained base or from intermediate checkpoints. A flat task vector
(expert - target) therefore silently *subtracts* the parent's post-training
update from every base-descended expert, destroying the target's instruction
and safety behaviour. We instead transport each expert along its own lineage,
tau_e = expert_e - parent(e),
so the update is measured from the checkpoint it was actually trained on.
For an expert whose parent differs from the target, part of tau_e simply
re-derives the post-training the target already has (delta_e = target -
parent(e)). Adding it double-counts that update and interferes with the
target. We project it out, keeping only the novel skill component:
v_e = tau_e - (<tau_e, delta_e> / <delta_e, delta_e>) delta_e.
Experts already descended from the target have delta_e = 0 and keep tau_e.
The skills are combined by a model soup whose strength adapts to the lineage.
An expert fine-tuned *from the target* has drifted away from the target's
general ability (domain SFT forgets instruction/safety), so its update is
added gently (half soup) to preserve the target. An expert descended from a
*different* checkpoint carries novel skill the target lacks, so its projected
update is added at full soup strength. Both keep the merged displacement
inside the target's linear-connectivity region. The target's token
embeddings / head are preserved. Dataless: uses only the lineage and the
weights, no calibration data, and works for arbitrary parent chains.The implementation obtains the expert labels, target weights, and expert count from the lineage, then chooses the recorded parent for each expert. A missing parent falls back to the target, which keeps the rule defined for an incomplete parent link.
experts = lineage.labels(role="expert")
target = lineage.target
tgt = lineage.nodes[target].weights
dev = ctx.device
n = max(len(experts), 1)
merged: Dict[str, torch.Tensor] = {}
for k in tgt.keys():
if "embed" in k or "lm_head" in k:
merged[k] = tgt[k].clone()
continue
base = tgt.get(k, device=dev, dtype=torch.float32)
acc = torch.zeros_like(base)
for e in experts:
par = lineage.parent(e) or target
pw = tgt if par == target else lineage.nodes[par].weights
we = lineage.nodes[e].weights.get(k, device=dev, dtype=torch.float32)
wp = pw.get(k, device=dev, dtype=torch.float32)
if we is None or wp is None:
continue
tau = we - wpProject out the target's redundant update
When , the target already contains the parent-to-target displacement
We remove the component of parallel to this displacement. For a nonzero ,
If the displacement has zero squared norm, the code skips the projection and keeps . Experts whose parent is the target also keep their transported update without projection. The projection is applied independently to each parameter tensor, so it removes one lineage direction at a time and does not require a shared flattened vector.
Lineage-dependent soup coefficients
Let , where is the expert set. For a regular parameter key, the merged tensor is
Thus an update from the target is added at half the ordinary soup weight, while an update from a
different checkpoint receives the full soup weight after redundancy projection. The coefficient is
determined by lineage rather than fitted to a domain. The target's parameters whose names contain
embed or lm_head are copied verbatim, preserving the target's token representation and output
head.
if par == target:
coef = 0.5 / n # same-parent expert: gentle, preserve target
else:
delta = base - wp # different-parent: remove redundant post-training
dd = (delta * delta).sum()
if dd > 0:
tau = tau - ((tau * delta).sum() / dd) * delta
coef = 1.0 / n # novel skill: full soup
acc = acc + coef * tau
merged[k] = (base + acc).to("cpu", dtype=tgt[k].dtype)
return mergedThe implementation also skips an expert contribution when either the expert or parent tensor is absent for a key. All other merged tensors are cast back to the target's dtype and returned with the target's key set, so the output remains a single model of the original architecture.
Results
| Method | ① | ② | ③ | ④ | ||||
|---|---|---|---|---|---|---|---|---|
| Normalised performance ↑ | TriviaQA retention ↑ | Normalised performance ↑ | TriviaQA retention ↑ | Normalised performance ↑ | TriviaQA retention ↑ | Normalised performance ↑ | TriviaQA retention ↑ | |
| Qwen4-Max | 61.26 | 0.509 | 87.86 | 0.357 | 55.91 | 0.506 | 98.91 | 0.309 |
| Unmerged parent model | 55.29 | 0.506 | 83.67 | 0.203 | 50.55 | 0.508 | 96.12 | 0.335 |
| Instruction specialist alone | 71.48 | 0.475 | 87.18 | 0.325 | 69.88 | 0.386 | 91.83 | 0.172 |
| Math specialist alone | 69.03 | 0.463 | 89.38 | 0.238 | 69.67 | 0.340 | 92.20 | 0.152 |
| Coding specialist alone | 66.89 | 0.487 | 84.44 | 0.356 | 63.83 | 0.495 | 93.28 | 0.290 |
| Multilingual specialist alone | 52.43 | 0.385 | 71.39 | 0.341 | 50.23 | 0.456 | 94.79 | 0.267 |
| Safety specialist alone | 67.25 | 0.424 | 81.82 | 0.318 | 62.62 | 0.392 | 88.06 | 0.211 |
| Weight average | 68.06 | 0.490 | 88.49 | 0.346 | 61.65 | 0.473 | 99.12 | 0.254 |
| Task arithmetic | 76.90 | 0.353 | 82.34 | 0.279 | 73.62 | 0.311 | 91.63 | 0.151 |
| TIES | 73.09 | 0.423 | 85.74 | 0.310 | 67.22 | 0.415 | 96.92 | 0.200 |
| DARE | 74.41 | 0.353 | 81.24 | 0.273 | 74.85 | 0.296 | 89.67 | 0.154 |
| Consensus TA | 75.68 | 0.398 | 84.40 | 0.304 | 73.60 | 0.352 | 93.91 | 0.165 |
| Localize-and-Stitch | 74.74 | 0.386 | 86.04 | 0.279 | 63.66 | 0.368 | 93.32 | 0.188 |
| RegMean | 76.96 | 0.461 | 90.13 | 0.346 | 71.03 | 0.459 | 101.6 | 0.233 |
| Fisher merging | 60.71 | 0.451 | 86.60 | 0.334 | 71.73 | 0.464 | 100.4 | 0.209 |
| RegMean++ | 76.14 | 0.468 | 89.80 | 0.337 | 70.34 | 0.468 | 102.2 | 0.250 |
| WUDI | 74.13 | 0.413 | 84.38 | 0.321 | 78.74 | 0.428 | 100.5 | 0.223 |
| DOGE-TA | 75.09 | 0.419 | 87.95 | 0.329 | 71.04 | 0.397 | 99.10 | 0.189 |
| AdaMerging | 73.38 | 0.382 | 77.61 | 0.186 | 73.15 | 0.382 | 98.78 | 0.162 |
| RAM | 74.24 | 0.455 | 86.77 | 0.323 | 69.47 | 0.433 | 98.69 | 0.210 |
| Localize-and-Stitch, tuned | 74.99 | 0.387 | 85.81 | 0.280 | 63.74 | 0.368 | 93.09 | 0.187 |
- ① Gemma-2-2B base pool (parent + 5 specialists)
- ② Gemma-2-2B-it pool (parent + 5 specialists)
- ③ Llama-3.2-3B base pool (parent + 5 specialists)
- ④ Llama-3.2-3B-Instruct pool (parent + 5 specialists)
On Gemma2-2B, our value is 61.26. Because higher is better, this is ahead of the parent control at 55.29, but behind the strongest published baseline, RegMean [6], at 76.96.
On Gemma2-2B-it, our value is 87.86. It is ahead of the parent control at 83.67, yet behind RegMean [6], whose published value is 90.13.
On L3.2-3B, our value is 55.91. It exceeds the parent control at 50.55, while the strongest published baseline, WUDI-Merging [10], reaches 78.74, so LTPMS remains behind it.
On L3.2-3B-Inst, our value is 98.91. This is above the parent control at 96.12 but below RegMean++ [9], whose published value is 102.20. Thus the run is ahead of the parent on every setting and behind the best published baseline on every setting.
How we got here
The trace records a progression from the starter's uniform average toward the final lineage-aware rule. We first treated model soup as a simple reference because the starter already averaged specialist weights. The trace then records tests of task-vector scaling, localization, and consensus-style alternatives across different lineage arrangements. Their behaviour varied with the lineage, which led us to focus on the structural error in a flat expert-minus-target vector.
The trace specifically records a norm-preserving scaling attempt being abandoned after it overshot, and a later attempt to use inverse update norms being explored but not becoming the submitted rule. The final implementation instead keeps fixed lineage-dependent soup coefficients and makes the structural adaptation come from the parent relation: transport every expert from its own parent, project out the target's inherited displacement for non-target parents, and attenuate target-descended updates.
Limitations
- The run is above the parent control on every setting but remains below the strongest published baseline on every setting, so lineage transport and projection alone do not close the gap.
- The method is deliberately dataless even though the task permits calibration statistics. It cannot use activations or gradients to detect which coordinates are domain-specific, and the half-soup versus full-soup choice is a structural heuristic rather than a learned coefficient.
- Projection is performed per tensor against one parent-to-target direction. Interference that is orthogonal to that direction remains, and a chain's earlier history is represented through the recorded immediate parent rather than an explicitly accumulated multi-step basis.
- Copying every key containing
embedorlm_headfrom the target protects the target interface but can discard specialist changes in those tensors. Missing expert or parent tensors are skipped, which can make the effective contribution depend on checkpoint completeness. - The rule assumes that a soup-scale displacement is a useful local compromise. It provides no guarantee that the merged weights stay in a region where all specialist behaviours remain compatible, and it offers no learned safeguard when the projected updates still conflict.
References
- Mitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre et al. (2022). Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. ICML.
- Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman et al. (2023). Editing Models with Task Arithmetic. ICLR.
- Prateek Yadav, Derek Tam, Leshem Choshen et al. (2023). TIES-Merging: Resolving Interference When Merging Models. NeurIPS.
- Yifei He, Yuzheng Hu, Yong Lin et al. (2024). Localize-and-Stitch: Efficient Model Merging via Sparse Task Arithmetic. TMLR.
- Michael Matena, Colin Raffel (2022). Merging Models with Fisher-Weighted Averaging. NeurIPS.
- Xisen Jin, Xiang Ren, Daniel Preotiuc-Pietro et al. (2023). Dataless Knowledge Fusion by Merging Weights of Language Models. ICLR.
- Le Yu, Bowen Yu, Haiyang Yu et al. (2024). Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch. ICML.
- Ke Wang, Nikolaos Dimitriadis, Guillermo Ortiz-Jimenez et al. (2024). Localizing Task Information for Improved Model Merging and Compression. ICML.
- The-Hai Nguyen, Dang Huu-Tien, Takeshi Suzuki et al. (2025). RegMean++: Enhancing Effectiveness and Generalization of Regression Mean for Model Merging. TMLR.
- Runxi Cheng, Feng Xiong, Yongxian Wei et al. (2025). Whoever Started the Interference Should End It: Guiding Data-Free Model Merging via Task Vectors. ICML.
- Yongxian Wei, Anke Tang, Li Shen et al. (2025). Modeling Multi-Task Model Merging as Adaptive Projective Gradient Descent. ICML.
- Enneng Yang, Zhenyi Wang, Li Shen et al. (2024). AdaMerging: Adaptive Model Merging for Multi-Task Learning. ICLR.
- Xiangchi Yuan, Dachuan Shi, Chunhui Zhang et al. (2026). Behavior Knowledge Merge in Reinforced Agentic Models.
- Yifei He, Siqi Zeng, Yuzheng Hu et al. (2025). MergeBench: A Benchmark for Merging Domain-Specialized LLMs. NeurIPS.