Pre-flight & Tooling (v0.64.0)

Six surfaces that catch mistakes before you spend a GPU hour: pick the right base, lock the run plan, freeze the environment, install completions, advise on licenses, and predict peak VRAM.

soup tunability — Pareto frontier of base-model efficiency

bash
soup tunability --dataset ./chats.jsonl --candidates llama-3.1-8b,qwen2.5-7b,gemma-3-9b \
  --probe-steps 100 --holdout-size 64 --output ./tunability.json

Probes a held-out dataset slice against each candidate base with a lightweight LoRA, measures training-loss deltas, and reports which bases form the Pareto frontier (best efficiency for cost). --plan-only dry-runs without probing; --list shows all bundled candidates.

  • Candidate allowlist with licensing metadata (Apache-2.0 / MIT / LLaMA-3 / etc.)
  • Bounds: probe_steps ∈ [10, 10000], holdout_size ∈ [10, 100000] rows
  • Safety: path containment, null-byte rejection, symlink-escape rejection
  • Output: per-candidate delta, wall-clock seconds, estimated USD cost, Pareto membership

soup plan / soup apply — Terraform-shaped drift detection

bash
soup plan --config soup.yaml --state ./soup.tfstate
soup apply --config soup.yaml --state ./soup.tfstate

plan computes cost / ETA / peak-VRAM / SHA-256 hashes from the config and writes an immutable soup.tfstate. apply re-reads the config, detects any drift (batch size, dataset SHA, base SHA) and refuses to proceed (exit 3) until you re-plan.

  • Pure JSON state: plan{cost, eta, sha}, applied: bool, applied_at, run_id
  • TOCTOU defense: os.lstat before open, symlinks rejected
  • Peak VRAM with 10% safety margin; spot pricing per GPU tier
  • Composes with v0.67 soup lock for full reproducibility

soup env lock / status / check — hermetic environment

bash
soup env lock --output ./soup-env.lock
soup env check --lock ./soup-env.lock   # exit 3 on ABI drift
soup env check                          # v0.73.3: also audits declared bounds, no lock needed

Snapshots Python version, CUDA major version, platform, and every installed package into a JSON lockfile. check detects ABI-sensitive drift (e.g. CUDA 12 → 13) that would silently break training.

Since v0.73.3 it also audits your installed packages against Soup's own declared version bounds, and exits 3 when one is violated. That runs first and independently of any lock file, so it catches the case it was reported for: installing a fast serving stack into a training environment silently pushes transformers past the <5.0.0 cap Soup itself declares, producing an environment Soup's own metadata calls unsupported with no warning at any point. The bounds are read from package metadata rather than a second hardcoded copy, because a second copy is exactly the drift this is meant to catch. The lock diagnostic still prints either way, so a bounds violation cannot hide a missing lock file or an ABI drift.

The practical guidance that came with it: install [serve-fast] in a separate environment from [train]. Their resolutions are genuinely incompatible today.

soup env fix — the repair, once check has told you something is wrong

bash
soup env fix                                   # print a uv-pip install plan from the lock
soup env fix --format requirements             # print it as requirements lines instead
soup env fix --format requirements -o req.txt  # also write that file, under cwd

It renders a reproducible install plan from soup-env.lock and prints it. It never installs anything, and that is deliberate rather than unfinished: recreating a virtual environment is environment-dependent, so Soup emits the commands for you to read, paste or script rather than shelling out to a package manager on your behalf. With no lock file it exits 1 and tells you to run soup env lock first.

  • Fields: soup_version, python_version, platform, cuda_version, packages {name, version, source}
  • Atomic write, file-size capped
  • Feeds the env_hash half of v0.67 soup.lock closure

soup completions <shell> — bash / zsh / fish

bash
soup completions bash  | sudo tee /etc/bash_completion.d/soup
soup completions zsh   > ~/.zsh/completions/_soup
soup completions fish  > ~/.config/fish/completions/soup.fish

Eval-safe shell completion scripts emitted to stdout (no Rich panels). Closed shell allowlist; all error messages go to stderr.

soup license-advisor — deploy-target risk gate

bash
soup license-advisor --target b2c --license llama-3 --monthly-active-users 750000

Returns ok / warn / block (exit 3 on block) for a (license, deploy-target, MAU) tuple. Targets: b2c, defense, embedded — each with distinct rules. Composes with v0.60 license-matrix on soup adapters merge.

Hardware-fit calculator — analytical peak VRAM

python
from soup_cli.utils.hardware_fit import estimate_peak_vram_gb, decide_hardware_fit

report = decide_hardware_fit(input, available_vram_gb=24.0)
# report.predicted_peak_gb -> 18.2
# report.breakdown -> {weights: 4.1, optimizer: 8.2, gradients: 4.1, activations: 1.3, overhead: 0.5}

Static predictor with a 5-bucket breakdown (weights / optimizer / gradients / activations / overhead) and a 10% safety margin. Refuses to run if predicted peak exceeds available VRAM.

If you disagree with it, soup train --allow-oom-attempt bypasses this gate and launches anyway. It is opt-out rather than opt-in for a reason: a prediction that refuses a run which would have worked costs you an argument, while a run that launches and does not fit costs you the run. Note this is the analytical gate for an ordinary resident run. Layer streaming skips it entirely and uses its own budget instead, which this flag does not reach; the streaming equivalents are the config keys stream_vram_probe and stream_vram_override.

  • 9 quant tiers (none, 4bit, 8bit, fp8, gptq, awq, aqlm, eetq, mxfp4)
  • 4 PEFT modes (full, lora, dora, qlora)
  • Bounds: seq_len ∈ [64, 1M], batch ∈ [1, 1024], params ∈ (0, 1000B]
  • Activation memory halved under gradient checkpointing

Numbers

Six surfaces, +N tests on top of v0.63's 10,035. Composes downstream with v0.65 eval depth, v0.66 post-train x-rays, and v0.67 adapter lifecycle.

See also

  • Soup lock — v0.67 closes the env_hash → soup.lock reproducibility chain.
  • Governance — v0.59 BOM + SLSA-3 + audit log layer on top of plan/apply.

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.