Skip to content

MaatML

MaatML fine-tunes small, task-specific models across text, vision, and vision-language, and takes them from experimentation to production through one declarative model.yml: prepare → train → evaluate → export → serve.

What makes it different: correctness is checked outside the model by validators. The same validator gates your synthetic data and your evaluation, and can guard your live inference: maatml serve runs it per request on /predict?validate=1, and on every response under --enforce, where a failing output is rejected with HTTP 422. So a MaatML model ships with a contract, not just weights. That validator-gated data → eval → serving loop, now across modalities, is what general fine-tuning tools leave out.

Install from PyPI (not from source):

pip install maatml
pip install "maatml[ml]"       # training stack
pip install "maatml[ml,vision]"  # + torchvision and ONNX (vision / VLM examples)
pip install "maatml[docs]"     # this site: mkdocs serve

Documentation

Canonical references in the repo:

Quick CLI map

Command Purpose
maatml prepare Build train/val/test splits
maatml train Fine-tune (LoRA / QLoRA / full / DPO / ORPO / vision / VLM)
maatml evaluate Validator + metrics + eval gates (--gate fails CI; --cache, --blind)
maatml gates derive / ship-check / operating-point derive Floors from reports, the release verdict, the val-derived threshold (evidence)
maatml runs / report The run registry (--pack / --adopt to move a run); the evidence document from the records alone
maatml export Bundle checkpoint (safetensors / gguf / mlx / onnx) + manifest.json
maatml verify Recompute sha256 of manifest files
maatml serve JSON inference API, validator inline (/predict?validate=1)
maatml datagen / distill / ingest / mint Validator-gated data flywheel

See the Plugin author guide for registering generators, exporters, validators, and metrics.