MIT · one developer · Apple Silicon

An LLM factory that fits
on one Mac.

posttrainllm turns a stock open model into a routed specialist that earns its keep — then tells you exactly where it fails. Distill, fine-tune, gate on real evals, package for MLX, and open the model up with interpretability. 100+ CLI subcommands, one Apple Silicon machine, no cloud.

the loop the runtime closes last run 2026-07-11
  1. 01targetfrozen
  2. 02data5,675 rows
  3. 03post-traindpo · 200 steps
  4. 04evalexec 0.920
  5. 05packagetgla / mlx
  6. 06decideretry-data

Every run assembles a schema-valid folder — config, dataset, eval, decision, report — that factory-run validates. The one proof still missing is a run whose decision is ship.

Specialists that are honest by design.

A specialist beats a generalist on its target and routes away when it shouldn't answer. Every result here ships with the regression it costs.

released · weights

Qwen3-4B, file-ops distilled

Distilled to 100% on the multi-turn file-ops hard gate (BFCL), up from 58%. The honest cost: out-of-domain breadth dropped 60% → 42% — real catastrophic forgetting. So it ships routed, never as a general planner.

file-ops gate
58% → 100%
OOD breadth
60% → 42%
size
4B · MLX
The distillation write-up →
report-only candidate

Qwen3-0.6B, routed SQL

Two adapters behind a router: public schema-SQL and local execution-SQL. Two reference-anchored DPO retries cured a policy collapse and pushed execution to 0.920 — but output hygiene is a base-model prior a small adapter can't strip. Decision: retry-data.

synthetic exec
0.860 → 0.920
public exact
0.531
clean-SQL
0.000
Full artifact + blockers →
Every artifact, with evidence and blockers →

Measured, on one machine.

Every number below was recorded on a single M5 Pro / 48 GB. No estimates.

76tok/s4B decode, MLX
12.1×speedupWebGPU vs WASM, XL
<45sper pass50-row SQL eval
0spikes200k pretrain steps
half memoryref-free vs DPO

The whole stack, audited against the code.

Not a wrapper. Every capability below is a real subcommand with tests behind it.

train

Pretrain, SFT, DPO / SimPO / KTO / ORPO, distillation, ES. Full PEFT bundle — LoRA, LoRA+, DoRA, VeRA, LoftQ, AdaLoRA, PISSA. WSD schedules, spike recovery, z-loss.

eval

BFCL, τ-bench, lm-eval (MLX adapter), HumanEval + sandbox, SQL execution, router, MILU, MTEB. Frozen baselines, slice metrics, exit-non-zero gates.

serve

OpenAI- and Ollama-compatible on one socket. Agent loop, tool dispatch, FSM-constrained JSON, persistent KV cache, speculative decoding, optional cloud escalation.

package

Export to MLX, safetensors, CoreML. Quantize (GGUF / AWQ / GPTQ / HQQ), prune, merge, bake-LoRA — DoRA magnitudes included. Specialist model cards.

inspect

SAE features, ROME, MEMIT, tuned / logit lens, activation patching, linear probes, attention heatmaps. Know where the model decides, not just what it answers.

browser

The same model trains in a browser tab via hand-written WebGPU kernels — Memory64, FlashAttention-2, blocked matmul. A from-scratch learning track, honest negative results and all.

The work shows its scars.

A factory is a loop, not a demo. Failed runs become the next recipe — and all of it is written down, with the decision it forced.

  1. 07-04

    Ref-free SimPO collapsed the SQL policy. Execution 0.860 → 0.080, degenerate fence-spam.

    retry-training preference tuning needs a reference anchor.

  2. 07-11

    Reference-anchored DPO fixed the collapse. Execution recovered to 0.900, then 0.920 at higher pressure — no regression.

    retry-data execution was never the problem; the Answer: wrapper is a base-model prior.

  3. now

    Diagnosis corrected in the open. The 108 SFT targets were already bare SQL — so hygiene needs a generation-strength fix, not more DPO.

    → next: constrained SELECT-prefix decoding.

The full attempt ledger →

Honest scope.

  • A single-developer project, shipping in public, MIT.
  • Mac-first — M-series, unified memory, MLX-Swift.
  • A factory for specialists, not a general assistant.
  • An OpenAI-compatible runtime any client already speaks.
  • Not a proven ship loop yet — the missing proof is a run that decides ship.
  • Not multi-GPU or distributed. One device, one Mac.
  • Not a cloud product. Nothing leaves the laptop unless you ask.