← TinyGPT · docs · devlog · roadmap · speedup
source: docs/recipes/automix.md · view on GitHub ↗

Recipe — micro-AutoMixer for data-mix ratios (B21)

Stop hand-waving “50/30/20 code/web/math”. tinygpt automix searches the ratio: sample candidate mixes, score each with a short proxy train run, fit a quadratic surrogate, and propose the next mix by predicted improvement until gains fall below a threshold. Scaled down from Poolside’s Laguna recipe; DoReMi is the rigor target for V2.

Run

tinygpt automix \
  --corpus code=stack.txt --corpus web=fineweb.txt --corpus math=meta.txt \
  --proxy-runs 6 --proxy-steps 2000 --max-iters 4 \
  --out automix-report.jsonl

Outputs:

V1 scores by negated final proxy-train loss. Task-eval scoring (BFCL/GSM8K via run-lm-eval) is the V2 extension; --task is reserved for it.

Interpreting the report

How it works (and how it’s tested)

bash evals/automix-smoke.sh    # asserts the loop converges to the synthetic optimum

Unit tests: Tests/TinyGPTModelTests/AutoMixTests.swift (sampler validity, surrogate optimum recovery, solver).