# Łączenie modeli

EN: **Model merging** · id `merging`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Trenowanie i dostrajanie](https://aiatlasgraph.com/t/training.md) › Łączenie modeli

## Description

- PL: Tworzenie nowego modelu przez arytmetykę na wagach już wytrenowanych modeli, bez dalszego treningu.
- EN: Building a new model by arithmetic on the weights of already-trained models, with no further training.

## In one sentence

- PL: To tworzenie nowego modelu przez łączenie ustawień lub części już wyuczonych modeli.
- EN: This creates a new model by combining parameters or components of already trained models.

## Problem it solves

- PL: Masz kilka przydatnych wariantów, ale kolejny pełny trening lub uruchamianie wszystkich naraz jest kosztowne.
- EN: You have several useful variants, but another full training run or running them all together is costly.

## What it does

- PL: Metody mieszają zgodne ustawienia, poprawki zadań lub układy warstw; efekt może wymagać sprawdzenia konfliktów i utraty umiejętności.
- EN: Methods mix compatible parameters, task updates or layer arrangements; the result needs checks for conflicts and lost abilities.

## Everyday example

- PL: Łączysz zgodne warianty modelu opisów produktów i sprawdzasz, czy nowy model zachował ich przydatne cechy.
- EN: You merge compatible product-description models and check whether the new model retains their useful characteristics.

## This concerns you if you…

- PL: masz zgodne, wcześniej wyuczone warianty
- PL: chcesz eksperymentować z łączeniem ich umiejętności
- EN: have compatible pretrained variants
- EN: want to experiment with combining their abilities

## Keywords

model soups · SLERP · task arithmetic · TIES-Merging · DARE · mergekit · evolutionary model merge · weight averaging

## How it works

- PL: Zgodne checkpointy łączy się przez interpolację wag, sumowanie aktualizacji lub składanie warstw. Wspólna baza i porównywalna parametryzacja umożliwiają operacje, a walidacja wybiera recepturę zachowującą pożądane zdolności modeli składowych.
- EN: Compatible checkpoints are combined through weight interpolation, update addition or layer composition. Shared bases and comparable parameterisations enable operations, while validation selects recipes retaining desired component-model capabilities.

## Limits

- PL: Zgodność kształtów nie gwarantuje zgodności funkcjonalnej wag. Aktualizacje mogą kolidować i pogarszać zdolności; dobór receptury kosztuje ewaluację i nie zastępuje testów wszystkich zastosowań.
- EN: Matching shapes cannot guarantee functional weight compatibility. Updates can conflict and degrade capabilities; recipe selection costs evaluation and cannot replace testing across applications.

## Key terms

- PL: **interpolacja wag**: Łączenie parametrów kilku modeli według wybranych współczynników.
- PL: **zgodność checkpointów**: Możliwość sensownego zestawienia parametrów lub warstw łączonych modeli.
- EN: **weight interpolation**: Combining several models' parameters using selected coefficients.
- EN: **checkpoint compatibility**: The ability to meaningfully combine parameters or layers across models.

## Know first

- [Algebra liniowa: wektory i macierze (Linear algebra: vectors and matrices)](https://aiatlasgraph.com/t/linearalgebra.md)
- [Zbiory testowe i regresje (Evaluation datasets and regression tests)](https://aiatlasgraph.com/t/evalsets.md)

## Examples

- PL: SLERP · TIES · DARE

## Subtopics (3 direct, 3 in total)

- [Arytmetyka zadań (task vectors, TIES, DARE) (Task arithmetic and task vectors)](https://aiatlasgraph.com/t/taskarithmetic.md): The difference between fine-tuned and base-model weights forms a 'task vector' that can be added, subtracted and combined. TIES resolves sign conflicts between vectors, while DARE sparsifies delta parameters before merging.
- [Ewolucyjne łączenie modeli (Evolutionary model merging)](https://aiatlasgraph.com/t/evolutionarymerge.md): An evolutionary algorithm searches weight mixtures or layer compositions instead of relying on one hand-designed recipe. The source paper also demonstrates merging models specialised in different domains.
- [Uśrednianie i interpolacja wag (model soups, SLERP) (Weight averaging and interpolation)](https://aiatlasgraph.com/t/weightaveraging.md): Combining several fine-tunes of the same base model by averaging or smoothly interpolating their weights. Often improves quality and robustness at no extra inference cost.

## Sources

- [LLM Course (Maxime Labonne)](<https://github.com/mlabonne/llm-course>) `mlabonne-llm-course` · by Maxime Labonne

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/merging · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
