Back to directory

mergekit

A toolkit for merging pre-trained large language models using an out-of-core approach that can run entirely on CPU or with as little as 8 GB of VRAM.

mergekit

mergekit is a toolkit for merging pre-trained language models, using an out-of-core approach to perform elaborate merges in resource-constrained situations; merges can run entirely on CPU or be accelerated with as little as 8 GB of VRAM. Merging combines the strengths of different models without the overhead of running an ensemble or the need for additional training, keeping the same inference cost as a single model.

It supports models including Llama, Mistral, GPT-NeoX and StableLM, with many merge methods, lazy tensor loading for low memory use, piecewise assembly of models from layers ("frankenmerging"), mixture-of-experts merging, LoRA extraction, evolutionary merge methods, multi-stage merging for complex workflows, and merging of raw PyTorch models.

It installs from source in editable mode, is released under the LGPL-3.0 license, and documents its merge configuration format, including parameter, tokenizer and chat-template specification.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.