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

tinygpt quickstart — your first specialist in one command

quickstart turns a data file into a trained, runnable specialist on your Mac with one command and zero ML knowledge: it inspects the data, auto-picks a base from the gallery, infers a LoRA recipe, trains, and samples the result so you can see whether it helped. It is the CLI sibling of the Mac app’s Factory tab (B6) and shares its decision core (RecipeResolver) with it.

Everything runs on-device. No account, no cloud upload — the only network is the initial base-model pull.

One command

tinygpt quickstart mydata.jsonl --yes

That inspects mydata.jsonl, resolves a (base, recipe), trains an adapter to adapter.lora, writes a reproducible tinygpt.project.json, and prints a few sample completions from the new specialist.

See the plan without training first:

tinygpt quickstart mydata.jsonl --dry-run

What it accepts

quickstart detects the data shape from the first lines:

Your data looks likeDetected shapeWhat it does
{"messages":[{role,content},…]}chatLoRA fine-tune, chatml template
messages with tool_calls / a "tools" keytoolCallLoRA fine-tune, longer --max-seq
{"instruction","output"} or {"prompt","completion"}instructionLoRA fine-tune
not JSON (a plain-text corpus)rawTextfrom-scratch pretrain (use tinygpt train)

If it can’t classify the data it tells you the expected formats and exits non-zero rather than guessing silently.

What it picks

The full mapping lives in RecipeResolver (see native-mac/Sources/TinyGPTModel/RecipeResolver.swift) and is unit-tested.

Output

Flags

FlagMeaning
--dry-runprint the resolved plan + project file; train nothing
--base <id|path|hf-id>override the auto-picked base
--gallery <path>gallery manifest.json (default: ./gallery/manifest.json)
--out <path>adapter output (default adapter.lora)
--samples <N>demo samples after training (default 3)
--yes, -yskip the train confirmation

Verify (no GPU)

bash evals/quickstart-smoke.sh

Asserts the --dry-run plan contract against fixture data: chat data picks the chat base, tool-call data picks the tool base with max-seq=2048, the project preview carries an adapter pin, and a missing file exits non-zero.

Limits (V1)