Autopilot
soup autopilot is the zero-config entry point added in v0.25.0. You pass a model, a dataset, and a goal. Autopilot profiles the dataset, model, and GPU, then emits a soup.yaml with every hyperparameter chosen and justified.
Quick start
soup autopilot \
--model meta-llama/Llama-3.1-8B \
--data chats.jsonl \
--goal chat \
--gpu-budget 24GBInputs
--model, --data and --goal are required when stdin is not a terminal: a missing one is a usage error (Missing option '--model' / '-m'., exit 2). In a terminal (since v0.76.0) Autopilot asks for whichever you left out: Base model (HF model id):, Dataset path (JSONL):, and a goal prompt that defaults to chat. A blank model or dataset exits 1. There is no way to pass a task: choosing one is what Autopilot is for.
| Flag | Meaning |
|---|---|
--model / -m | Any HuggingFace repo or local path (required; prompted in a terminal) |
--data / -d | JSONL dataset in a format Soup detects (alpaca / sharegpt / chatml / dpo / kto / tool-calling, or plaintext for --goal domain-adapt) (required; prompted in a terminal) |
--goal / -g | chat · reasoning · code · classification · tool-calling · alignment · domain-adapt (required; prompted in a terminal, default chat) |
--gpu-budget | VRAM budget (defaults to detected GPU) |
--output / -o | Config path (default: ./soup.yaml) |
--dry-run | Print decisions without writing soup.yaml |
--yes / -y | Skip the confirmation prompt |
What Autopilot decides
- Task — maps goal → SFT / DPO / GRPO / pretrain, including the tool-calling format where appropriate. Those four are the whole range: the seven goals above map to
sft(chat, code, classification, tool-calling),grpo(reasoning),dpo(alignment) andpretrain(domain-adapt). - Quantization — chooses
none,8bitor4bitfrom the model size against your VRAM budget:noneat 5 GB or more per billion parameters,8bitfrom 3 GB,4bitfrom 1.2 GB, and an error below that. A base that is already quantized (GPTQ, AWQ and similar) keeps its own format instead. A detectedmxfp4base is budgeted as the bf16 model it loads (2 bytes per parameter), and Autopilot refuses a--gpu-budgetbelow that. - PEFT — picks LoRA r=8/16/32 from dataset size, and turns on DoRA when the data is large and the VRAM headroom allows it. It does not select VeRA, and it does not turn LoRA off. DoRA stays off on a GPTQ, AWQ, AQLM or EETQ base, because peft cannot apply DoRA to those layers (v0.76.0, #1466).
- Batch size × grad_accum — estimates the per-device batch size from VRAM, then sets gradient accumulation to
32 // batch(at least 1), so the effective batch is about 32. - Learning rate — scales with rank and quantization (e.g. LoRA r=16 → 2e-4, 4bit → ×0.8).
- Epochs — 5 → 3 → 2 → 1 depending on dataset size.
max_length— the dataset's p95 token length times 1.1, rounded down, at least 256 and clamped to the model context.- Perf flags — for the goals that train with SFT, turns on FlashAttention and Liger Kernel only when the GPU is Ampere or newer (compute capability 8.0 or higher) and the package is installed (
flash-attn, orsoup-cli[liger]); when the card qualifies but a package is missing, the Decisions panel names it and the install command. Before v0.76.0 it wrote both flags without checking, sosoup train,--dry-runincluded, then refused the file Autopilot had just written. It also turns ongradient_checkpointingwhenmax_lengthis above 8192 or the VRAM headroom (the budget minus 2 GB per billion parameters) is under 4 GB, a zero or negative headroom included (a budget at or below the fp16 weights). Since v0.78.0 (#2865, reported by @abdumutalipabay0, fixed by @Shubham-dev-stack in #2885) that case writestrue; through v0.77.2 the headroom was clamped at 0.0 before the test and a zero headroom wrotefalse(read from the v0.77.2 code,generate_config.pyanddecisions.py; the old binary was not run for this). Run on the v0.78.0 binary with an 8B model and a dataset of 60 rows:--gpu-budget 12GBand16GBwrotegradient_checkpointing: true,20GBand above wrotefalse. The Python functiondecide_performance_flagscalled withoutvram_headroom_gbstill returns checkpointing off, and an explicit0.0now counts as zero headroom and returns it on. Otherwise it writesgradient_checkpointing: false, and since v0.77.0 that value reaches the GRPO trainer, so areasoningconfig trains with checkpointing off where TRL's own default (on) used to apply; settraining.gradient_checkpointing: trueto keep the memory you had. It does not choose a backend:backend: mlxis something you set yourself. Both flags stay valid in what Autopilot writes: the file carriesmodality: textandbackend: transformers(the defaults, written out), and since v0.77.2task: sftrefusesuse_flash_attn: trueanduse_liger: trueon the vision, audio andbackend: unslothpaths (andreasoning_effortandtrain_on_eoton some others; the matrix), so if you changemodalitytovisionoraudio, orbackendtounsloth, in an Autopilot file, delete both keys or set them tofalsefirst. - Training intelligence — not written since v0.76.0. Through v0.75.2 Autopilot wrote
forgetting_detection,checkpoint_intelligenceandearly_stop_on_regressionastrue, andsoup trainthen printed "set but not enforced during training in this build"; it now leaves all three off and no longer prints them, because nothing enforces them. A config generated by an older Autopilot still carries thetruevalues and still prints that note. For a check that does run, add--gate(see Training intelligence).
Autopilot prints its decisions in a Rich panel before it writes anything, and --dry-run stops there. The panel lists the values it chose, not a reason for each one, and it prints no time or VRAM estimate.
A config an older Autopilot wrote
Autopilot writes the full schema dump, defaults included, so a soup.yaml from an older release carries the defaults of that release. One of them stops the load at v0.77.0: configs written on v0.75 and earlier carry data.remove_unused_columns: true, and since v0.77.0 soup train refuses it (data.remove_unused_columns: true never had an effect (no trainer reads it; the trainers that set it pass false). Delete the line. Refused as of Soup v0.77., exit 1). Delete the line, or set it to false. Run soup doctor --config soup.yaml on an old file before you start a run: it exits 2 on a refusal, so fix that setting and run it again until it prints no error.
Example output
The command prints a summary panel (dataset, model, hardware, goal) and then the decisions. Here is the second one for a 15,000-row chat dataset, an 8B model, --gpu-budget 24GB and an Ampere-or-newer GPU with both kernel packages installed (on a card that qualifies but lacks the packages, the two kernel lines read off (flash-attn not installed; pip install flash-attn --no-build-isolation to enable) and off (liger-kernel not installed; pip install "soup-cli[liger]" to enable), and on a card below compute capability 8.0 they read False):
╭───── Autopilot Decisions ─────╮
│ Quantization: 8bit │
│ PEFT: LoRA r=32, alpha=64 │
│ Batch size: 1 x grad_accum 32 │
│ Learning rate: 0.0001 │
│ Epochs: 2 │
│ Max length: 2002 │
│ Flash Attention: True │
│ Liger Kernel: True │
╰───────────────────────────────╯
Config written: /home/you/project/soup.yamlSafety
- Dataset and output paths are resolved and constrained to the working directory (no path traversal).
- GPU budget is bounded to 1GB–1TB; there is no time budget:
--gpu-budgetis the only budget the command accepts. - Model names are validated against HuggingFace Hub naming rules.
- Model code is never executed during analysis — Autopilot uses HF Hub metadata only.
See also
- Training methods
- Backends — including MLX
- Training intelligence — the forgetting-detection and checkpoint options, and which of them are enforced
- Recipes — start here if you don't need Autopilot
Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.