# arcee-ai/mergekit

> mergekit is a toolkit for merging pre-trained language models, written in Python. It uses an out-of-core approach, so merges can run in resource-constrained setups either entirely on CPU or accelerated on a GPU. It supports a range of merge methods, such as linear averaging, SLERP, TIES and DARE, that combine the weights of several models into one.

Source: https://github.com/arcee-ai/mergekit
Indexed: commit 0f1423e on 2026-11-21 by Repowise. Facts come from the source and git history, not from the maintainer.

## Facts

- Type: Command-line tool
- Language: Python
- Stars: 7,485 at index time
- License: LGPL-3.0
- Code health: 8.6/10, Excellent
- Last commit: 2026-10-31
- Contributors: 51

## Install

From the README: https://github.com/arcee-ai/mergekit#installation

Clone the mergekit repository.
    git clone https://github.com/arcee-ai/mergekit.git

Clone the mergekit repository and change into its directory.
    cd mergekit

Install the package in editable mode so the scripts are available.
    pip install -e .

## How to use

Run a merge by passing a YAML configuration file and an output directory to mergekit-yaml.
    mergekit-yaml path/to/your/config.yml ./output-model-directory [--cuda] [--lazy-unpickle] [--allow-crimes] [... other options]

## How it works

The main command-line entry point is mergekit-yaml, which takes a YAML configuration file and an output path and writes the merged model to that path. The mergekit directory holds the package, and mergekit/__init__.py marks it as the package entry point. Additional command-line scripts live in mergekit/scripts, including mergekit/scripts/extract_lora.py for LoRA extraction and mergekit/scripts/evolve.py for evolutionary merges. Merge methods can also be called from Python through mergekit.merge_methods, using merge_tensors for a single tensor or merge_state_dicts for models already in memory. The tests directory contains the project's test files, and pyproject.toml declares the dependencies, including safetensors, huggingface_hub and ray.

- mergekit/__init__.py: entry point
- mergekit/scripts/bakllama.py: entry point
- mergekit/scripts/evolve.py: entry point
- mergekit/scripts/extract_lora.py: entry point
- mergekit/scripts/layershuffle.py: entry point
Modules: mergekit, tests. 193 files, 17,226 lines, 988 symbols.

## Code health

- Score: 8.6/10 (Excellent)
- Rank: #36 of 4,000+ indexed repos
- Hotspots: none
- Lowest file: mergekit/merge.py
- Dead code: none found

## Maintenance

- Last commit 2026-10-31, first commit 2023-08-21, 313 commits
- 51 contributors, bus factor 1

## Security

- Security findings are shown to signed-in users at https://repowise.dev/repo/arcee-ai/mergekit/security

## More

- Page: https://repowise.dev/repo/arcee-ai/mergekit
- Ask this codebase: https://repowise.dev/repo/arcee-ai/mergekit/chat
- Docs: https://repowise.dev/repo/arcee-ai/mergekit/docs
- MCP (signs in with Repowise on first use):
    claude mcp add --transport http repowise https://api.repowise.dev/mcp/arcee-ai/mergekit
