Architecture of arcee-ai/mergekit
arcee-ai/mergekit is 193 source files holding 988 symbols across 2 modules, written mainly in Python. The largest module is mergekit, with 91 files, and 11 files are entry points into the dependency graph.
How mergekit fits together
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.
Largest modules
- mergekit: 91 files and 12,828 lines of code
- tests: 21 files and 4,398 lines of code
Documentation
Repowise documents mergekit in 133 pages generated from the source, 13 of them written explanations of the repository and its modules. Module guides include:
- mergekit/architecture: Chat Template Configuration
More on mergekit: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos