mergekit

Merge fine-tuned language model checkpoints into a single fused model using YAML configurations.

Updated May 2, 2026
One-click install
npx skills add https://github.com/qcmuu/AI-Research-Skills --skill mergekit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mergekit
Source: https://github.com/qcmuu/AI-Research-Skills/tree/main/19-emerging-techniques/mergekit
Command: npx skills add https://github.com/qcmuu/AI-Research-Skills --skill mergekit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mergekit, transformers, torch, pyyaml.

What problem does it solve?

Mergekit solves the problem of combining multiple fine-tuned language model checkpoints into a single better generalist without needing additional training.

Core Features & Use Cases

  • GPU-free model fusion: Create a merged model primarily via CPU workflows for many merge methods, avoiding costly retraining.
  • Multiple merge strategies: Use SLERP, TIES, DARE, Task Arithmetic, Frankenmerge (layer stacking), and Evolutionary merge to control how capabilities combine.
  • Practical outcomes: Combine coding/math/reasoning specialists to reduce catastrophic forgetting and improve breadth compared to selecting a single checkpoint.
  • Use Case: You have separate LoRA/finetune outputs for math and coding on the same base architecture; Mergekit merges them into one checkpoint that balances both abilities.

Quick Start

Ask the AI to merge your checkpoints into an output directory by running mergekit on a SLERP YAML config file (e.g., mergekit-yaml slerp_merge.yaml ./merged-model --copy-tokenizer).

Frequently Asked Questions about mergekit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge multiple fine-tuned LLM checkpoints into one model without training?

You can merge multiple fine-tuned LLM checkpoints into a single fused model without gradient-based training by using mergekit. It applies model fusion workflows like SLERP, TIES, DARE, and Task Arithmetic to combine specialist capabilities into a generalist checkpoint via a YAML configuration.

Can I combine language model checkpoints on a CPU without a GPU?

Yes, you can combine language model checkpoints on a CPU without a GPU. Mergekit supports GPU-free model fusion for many merge methods, allowing you to create a merged model primarily via CPU workflows to avoid costly retraining.

What is the best way to merge coding and math specialist models to reduce catastrophic forgetting?

The best way to merge coding and math specialist models to reduce catastrophic forgetting is using strategies like SLERP, TIES, or DARE. Mergekit balances both abilities in one checkpoint, improving breadth compared to selecting a single fine-tuned model.

How do I run a SLERP model fusion using a YAML config file?

To run a SLERP model fusion, execute the mergekit-yaml command on your SLERP YAML config file. You specify the models, weights, merge method, and output directory, for example: mergekit-yaml slerp_merge.yaml ./merged-model --copy-tokenizer.

Does mergekit support Frankenmerge layer stacking and evolutionary merge optimization?

Yes, mergekit supports Frankenmerge layer stacking and EvoMerge optimization. These methods control how capabilities combine when fusing multiple fine-tuned language model checkpoints into a single generalist model.

Do I need compatible base architectures to merge LoRA outputs with mergekit?

Yes, you need compatible base architectures and model formats to merge LoRA or finetune outputs with mergekit. The toolchain requires checkpoints from the same base architecture to successfully combine them into a balanced generalist model.