Skip to content

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 qwen3-1.7b,llama-3.2-3b,phi-4-mini \
  --probe-steps 100 --holdout-size 64 --output ./tunability.json

Ranks candidate bases by how much fine-tuning is likely to buy on your data, and reports which of them form the Pareto frontier (best efficiency for cost). By default the score is a deterministic heuristic, not a measurement. Add --live (with --device) to actually probe each candidate with a lightweight LoRA on a held-out slice and rank on measured training-loss deltas.

--candidates is an allowlist, and a name outside it exits non-zero rather than falling back. The eight bundled candidates are qwen3-0.6b, qwen3-1.7b, llama-3.2-1b, llama-3.2-3b, gemma-3-e2b, phi-4-mini, smollm3-1.7b and qwen2.5-1.5b; --list prints them with their licences, and --plan-only dry-runs without probing.

  • 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 a soup.tfstate. A second soup plan replaces that file and clears the applied mark, so run soup apply after the last plan. apply re-reads the config, detects any drift (batch size, dataset SHA, base SHA) and refuses to proceed (exit 3) until you re-plan. apply does not start training: with no drift it marks the plan applied in the state file and prints the soup train --config ... command to run. apply compares hashes only and, since v0.77.1, does not read the model, so it makes no request to the Hub. soup plan can: to size the run it reads a Hub model's config.json, which reaches the Hub and writes that file into the Hugging Face cache unless HF_HUB_OFFLINE or TRANSFORMERS_OFFLINE is set, and it prints a dim line saying so before the first request.

Since v0.77.1 (#2242) both commands refuse what soup train refuses. After the YAML read limits (below) they run the validation soup train runs and print the same Config validation error: lines: an unknown key (unknown config key 'x' - refused.), a staged field set away from its default, a refused deprecated value or any other schema error exits 1, writes no plan and leaves an existing state file as it was, so soup apply does not mark it applied. A valid config plans and applies as before. Through v0.77.0 they checked unknown keys (since v0.76.0) and nothing else: soup plan wrote a plan (exit 0) for a config that soup train refused with exit 1, and at v0.75.x they skipped even that check. Run soup doctor --config soup.yaml first: it reports unknown keys together, then the staged fields, then the first other refusal it hits, so fix what it names and run it again until it prints no error (see the settings refused at load).

One config loads under soup train only because of a CLI flag. A distill config with training.minillm_enabled: true, training.minillm_teacher_mix_ratio: 0 and no training.minillm_on_policy loads under soup train --minillm-on-policy, because that flag sets the field before validation. Through v0.77.1 soup plan and soup apply had no such flag and refused the config, so the YAML had to carry training.minillm_on_policy: true. Since v0.77.2 both take --minillm-on-policy (#2315, by @Nari-Ab): the config is validated and hashed like any other, and soup apply keeps the flag in the soup train command it prints and still only records the plan. Give the flag to both commands: the plan does not store it, and soup apply without it exits 1 with the config validation error on a plan made with it (run on the v0.77.2 binary, with soup apply --dry-run).

bash
soup plan --config soup.yaml --minillm-on-policy
soup apply --config soup.yaml --minillm-on-policy

Since v0.76.1 both commands read the file under the shared YAML limits: a config larger than 1 MiB, nested more than 100 levels deep or expanding past its alias allowance exits 2 with one line such as config 'soup.yaml' is larger than 1048576 bytes; refusing (v0.76.0 read such a file, and plan wrote a plan for it). Through v0.77.1 a YAML syntax error exited 1 with the parser's own error. Since v0.77.2 (#2323, by @Nari-Ab) a syntax error and a config that cannot be read exit 2 as well, with a line that names the config and the YAML location (Config 'soup.yaml' is not valid YAML: ... (line L, column C), or Config 'soup.yaml' cannot be read: <reason>); a missing file is still 1 (Config not found: ...). See Size and nesting limits.

  • Pure JSON state: plan{cost, eta, sha}, applied: bool, applied_at, run_id
  • TOCTOU defense: os.lstat before open, symlinks rejected
  • Peak VRAM is the soup train pre-flight's estimate for the run, before its 10% margin, or null with a peak_vram_reason when the plan cannot price it: the model's config.json could not be read, batch_size: auto (the default), a quantization with no memory model, layer streaming or backend: mlx. Through v0.77.0 it was a fixed 8.0 GB for every run. A state file written before that still loads, and peak_vram_gb is not part of the drift check. Do not read a state file written by v0.77.1 with an older Soup: a null there makes the v0.77.0 soup apply exit 2.
  • One flat spot price of $0.30 per hour, not one 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 the Python version, the platform, the CUDA version and, for each of 15 ABI-sensitive packages that is installed, its version (torch, transformers, peft, trl, accelerate, datasets, bitsandbytes, huggingface-hub, flash-attn, xformers, deepspeed, unsloth, vllm, sentencepiece, tokenizers) into a JSON lockfile; a tracked package that is not installed is left out. check flags drift in any of them (a Python minor version, the platform, any change of the recorded CUDA version string, a tracked package whose version changed or that appeared or disappeared) that would silently break training. The CUDA version is read from the CUDA_VERSION or CUDA_HOME environment variable, or from PyTorch only if it is already imported; without the variables no CUDA version is recorded, so a CUDA change goes unseen.

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 upper bound Soup itself declares (<5.0.0 when this check shipped in v0.73.3, <6.0.0 since the v0.74 stack move), 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. They complete command and option names only: no option or argument has a value completer, so recipe names and config keys do not complete. The script is the installed Typer's own: the bash one falls back to your shell's file-name completion, the fish one does not.

After upgrading to v0.77.2, run these commands again and replace the installed script. v0.77.2 restored command and option completion by using the installed Typer's matching completion protocol and response format (#2283, by @Nari-Ab); a script written by an earlier release does not complete.

soup license-advisor — deploy-target risk gate

bash
soup license-advisor --target b2c --license llama-3 --monthly-active-users 800000000   # block, exit 3

Without --license it prints the recommended and forbidden licenses for the target and exits 0. With --license it adds a risk check that is ok, warn (both exit 0) or block (exit 3). --monthly-active-users (alias --mau, default 0) matters for the Llama licenses: on b2c 750,000 users exits 0 and 800,000,000 exits 3, and on defense the same Llama license at 750,000 users already exits 3, while embedded at 750,000 exits 0. An unknown --target exits 2.

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 HardwareFitInput, decide_hardware_fit

report = decide_hardware_fit(
    HardwareFitInput(
        params_b=8.0, seq_len=2048, batch_size=1,
        optimizer="adamw_torch", quant="4bit", peft="qlora",
        gradient_checkpointing=True,
    ),
    available_vram_gb=24.0,
)
# report.ok, report.peak_vram_gb, report.required_with_margin_gb, report.reason
# report.breakdown.weights_gb, .optimizer_gb, .gradients_gb, .activations_gb, .overhead_gb
# since v0.77.1 also .adapters_gb, .logits_gb, .dequant_gb
# since v0.77.2 also .optimizer_step_gb
# since v0.78.0 also .teacher_gb, .distill_gb, .teacher_generation_gb (0 outside task: distill)

estimate_peak_vram_gb(HardwareFitInput(...)) returns a VRAMBreakdown in GB. It has eight terms from v0.77.1 (weights, optimizer, gradients, activations, overhead, adapters, logits, dequant), nine from v0.77.2, which adds optimizer_step, and twelve from v0.78.0, which adds teacher, distill and teacher_generation (described below). The optimizer_step term is how far the optimizer step's peak exceeds the forward and backward pass, or 0 (soup profile --json returns it as optimizer_step_memory_gb). Through v0.77.0 it had five. All of them are predictions from a formula, not measurements. (Python API, v0.77.2: soup_cli.utils.profiler no longer has estimate_model_memory, estimate_trainable_params, estimate_lora_memory, estimate_optimizer_memory, estimate_activation_memory or estimate_total. Nothing called them since #2146 in v0.77.1, so their numbers were not what soup profile printed; use soup profile --json. soup profile output is unchanged, #2369.) The example above builds its input from params_b alone, so it carries no model shape; soup train builds its input from the model's own config.json.

One estimate, four callers (v0.77.1, #2146). soup train's pre-flight, soup profile, the MCP profile tool and soup plan price a run with one estimate (the same function), but they do not always feed it the same run: soup profile prices batch_size: auto at 4 where the pre-flight and soup plan price nothing, gradient_checkpointing: auto resolves on the card only in the pre-flight, and a model the command cannot read is priced from a guessed shape. It reads the model's config.json and safetensors headers (never the weights) and sums the weights, the LoRA adapters, gradients, optimizer state, activations, the logits and loss over the vocabulary, the 4-bit dequantization copy and the CUDA overhead. The pre-flight adds a 10% safety margin; soup plan records the figure before it. Through v0.77.0 this was a five-bucket predictor (weights, optimizer, gradients, activations, overhead) that sized a Hub model from its name.

soup profile --model: will it fit, without a soup.yaml (v0.77.2, #2285 by @abdulwaarith0). Give soup profile a model and the run you have in mind, and it prices that run from the model's own config.json (a local directory, the Hugging Face cache or the Hub), with the same estimate a soup.yaml describing that run would get:

bash
soup profile --model ./my-model --seq 2048 --batch 4 --method qlora --lora-r 64
soup profile --model org/model --method full --optimizer adamw_torch --gradient-checkpointing full --json

The defaults are a sequence of 2048, batch 4, --method qlora, LoRA rank 64, adamw_torch and no gradient checkpointing (--gradient-checkpointing takes off, full, medium, selective or auto; --method takes lora, qlora or full). When no config.json can be read it exits 1 and says why, for example Cannot read ./m0: there is no readable config.json in that directory. Nothing was estimated: --model needs the model's own config.json, not a size guessed from its name. --model cannot be combined with --config, and --seq, --batch, --method, --lora-r, --optimizer and --gradient-checkpointing are refused without --model (exit 1). When no safetensors headers can be read, the parameter count comes from config.json and the panel says so. soup profile --json also returns a lora_r field (the rank priced, null for a full fine-tune) and keeps stdout strict JSON, with diagnostics on stderr (#2398); soup cost --json does the same (#2345). On Apple Silicon, soup profile and the MCP profile tool compare the estimate with Metal's recommended working-set size instead of the whole unified memory, and gpu_memory_source reads mlx working set. The estimate's terms were fitted on CUDA runs (below), not on Apple hardware, and this page prints no figure from a plan.

When it refuses, and when it only warns (the v0.77.x estimator; what v0.78.0 changed is in its own section below). The v0.77.x estimate was calibrated on 42 resident two-step sft runs on one RTX 3060 Laptop 6 GB (WSL2), across seven dense models from 135M to 3B parameters, and its coefficients are fitted on 39 of them (the record). Rows 1 to 39 existed at v0.77.1; rows 40 to 42 were added for #2277, short full fine-tunes where the optimizer step, not the forward and backward pass, sets the peak. The record states that the coefficients are fitted on rows 1 to 39, so the ratios it prints show how well they fit those rows, not the error on a run they were not fitted to. No model of 7B or more, no mixture-of-experts model, no medium or selective checkpointing row, no fused loss (use_liger, use_cut_ce) and no Unsloth run was measured among the 42 rows. The pre-flight refuses a run whose estimate does not fit only when the run is inside that range, which the message names: "dense models of 3B and below on one 6 GB card". Outside it, the figure is printed as a warning ("outside the calibrated range ...; the estimate may overstate the peak") and the run starts, unless the run's floor alone is more than the card holds: the weights, the CUDA context, and the adapters, gradients and optimizer state of the parameters the run trains. Those are bytes per parameter times a count, so none is an extrapolation, and that run is refused even outside the range. --allow-oom-attempt launches a refused run anyway. In that floor, the optimizer state is counted only for adamw_torch, adamw_torch_fused, schedule_free_adamw and adamw_bnb_8bit, and not with use_galore on sft, tts or pretrain; the estimate itself prices the other optimizers too.

Two details of the terms. gradient_checkpointing: auto resolves on the card the way the sft trainer resolves it, selective is priced as no checkpointing (an upper bound), and every task other than sft and tts checkpoints fully. Tasks with no LM head (classifier, reranker, cross_encoder, embedding, reward_model) are charged no logits term, and since v0.77.2 a task: prm step is charged the logits of one position (#2337, #2372, by @ybai08). A config that leaves batch_size at its default auto is not priced by the soup train pre-flight, so set a number to get the check; soup profile prices auto at 4. Inside that range (dense models of 3B and below on one 6 GB card), the pre-flight now refuses some long-sequence, large-vocabulary runs and some runs without gradient checkpointing that it let through (the release's own wording).

What v0.77.2 changed in the estimate. Six changes, each from upstream's changelog; none is a new measurement on a card unless it says so, and this page prints no figure from a plan.

  • The optimizer step is its own phase (#2338, by @abdulwaarith0, from #2277). The peak is the larger of the forward and backward pass and the optimizer step, and optimizer_step is how far the second exceeds the first. A short full fine-tune with adamw_torch is priced higher, because torch's foreach AdamW update allocates scratch beside the optimizer state and, on a short sequence, that step rather than the pass sets the peak. So inside the fitted range the pre-flight can now refuse a short full fine-tune it let through; --allow-oom-attempt still launches it. Only adamw_torch has a measured step cost; the other optimizers are charged none.
  • A sharded run's floor is priced per card (#2313, by @ybai08). A run sharded with --fsdp full_shard, full_offload or shard_grad, or with DeepSpeed ZeRO-2 or ZeRO-3, across more than one process has its floor priced per card (the panel says "the floor is per card; the other figures are for one unsharded card"), so, in upstream's changelog example, FSDP-QLoRA of a 70B model in 4-bit on two 24 GB cards is no longer refused before it starts (an example, not a measurement on this page). The estimate was fitted on single-card runs, so for such a run it warns instead of refusing, unless the per-card floor alone (the weights, the CUDA context and the state of the parameters the run trains) is larger than the card, which still refuses; --allow-oom-attempt launches it anyway. The same rule applies to any run outside the calibrated range.
  • task: prm is charged the logits of one position instead of the cross-entropy chain it never builds (#2337, #2372, by @ybai08). The model types whose forward has no logits_to_keep, and remote-code bases, keep the full-sequence charge.
  • stream_loss_chunk (#2290, by @ybai08). Since v0.77.2 the pre-flight charges a stream_loss_chunk step the larger of the loss phase and the last layer's checkpoint recompute. Upstream measured the change once, on one model and one card (Llama-3.1-8B NF4, batch 1, one RTX 3060 Laptop 6 GB under WSL2), for separate q/k/v/o and gate/up/down projections only; it does not cover fused gate_up, Mixture-of-Experts layers or LoRA on MLP modules, and no benchmarks/ record holds the table, so this site prints no figure from it. A short NF4 run without the option can be predicted higher.
  • backend: unsloth is priced with the loader's seven automatic LoRA targets and with the embedding and output head at 2 bytes a parameter instead of Transformers' fp32 (#2376, by @ryznren). That rests on one load-and-inject observation on an RTX 5090 with unsloth/Meta-Llama-3.1-8B-bnb-4bit, which found both weights in bfloat16 and adapters on all seven targets in 32 layers (the record); it ran no forward or backward pass and observes bfloat16 on that model and stack only. Unsloth's activations and logits stay uncalibrated, so an Unsloth run outside the measured range still warns and starts.
  • training.activation_offloading is not modelled, and the estimate now says so (#2331, by @ybai08). The soup train pre-flight, soup profile (text and --json), soup plan and the layer-streaming plan panel say, when it is set, that the activation term is still charged as if every saved tensor stayed on the card, since what cpu or disk offloading moves off it is not modelled. The estimate and the refuse-or-warn decision are unchanged.

What v0.78.0 changed in the estimate

Eight changes, each from upstream's changelog and release notes. None is a new measurement on a card unless it says so, and this page prints no figure from a plan and no before and after table. The preprint's validation describes the estimator of v0.77.x: upstream changed the estimate in v0.78.0 (#2749, #2871, #2934), and the preprint itself is unchanged.

  • Padded text SFT is priced by its longest row (#2934). A text SFT run that pads each micro-batch (transformers backend, no packing, no multipack, no streamed data, no layer streaming) whose estimate at data.max_length does not fit used to be refused. Now the verdict is held back until the data is loaded, the longest row of the train and validation splits is measured with the trainer's own tokenisation (no model is loaded), and the run is priced at that length, at least 64 tokens. The pre-flight prints one line, for example Pre-flight: priced at 79 tokens, the longest row; data.max_length is 1024 (72 rows read). ..., and the Start training? prompt now follows the verdict for such a run. At most 20,000 rows and about 90 seconds are read, and past either, or with no readable tokenizer, a model that ships its own code, or data that is not chat messages, the run is priced at data.max_length as before. Upstream says no run is refused that was not refused before, and that the lifted path itself has not been run on a GPU.
  • 8-bit with gradient checkpointing is priced higher (#2860, #2925). The estimate now charges the inputs that bitsandbytes' int8 matmul keeps outside checkpointing. It rests on three pretrained models of 1.5B parameters and below (Qwen2.5-0.5B, Qwen2.5-1.5B, SmolLM2-360M) on one card under a memory cap (benchmarks/gate-int8-checkpointing-vram.md), and gradient_checkpointing: medium is outside the calibrated range and only warns. A run that launched close to the card's limit can now be refused; --allow-oom-attempt, a lower batch_size or a lower data.max_length launch it.
  • task: distill is priced with its teacher (#2909, #2950). Three new terms, teacher, distill and teacher_generation, carry the frozen teacher's weights at the dtype its checkpoint stores, the divergence over the vocabulary (it depends on distill_chunk_size and distill_checkpoint), and, with distill_mode: sequence, the teacher's generation before the first step. uld_strategy and minillm_enabled are not measured and are priced at the largest measured figure, and the estimate says so; a teacher over 1,000B parameters is not priced (the student alone is, with a note). A distillation step counts as outside the calibrated range, so a run whose student fits but not with its teacher gets a warning that names the teacher's terms and still launches, while a student that alone does not fit is still refused inside the range. soup profile --json returns teacher_memory_gb, distill_memory_gb and teacher_generation_memory_gb (0 outside distill). The record (gate-distill-teacher-vram.md) covers one student architecture and one real teacher on one shared card; ULD and MiniLLM were not measured.
  • Resident 4-bit and 8-bit price embeddings and norms at 2 bytes on a bf16 card (#2683). The soup train pre-flight keeps the fp32 charge on a CUDA card without bf16 hardware and under grpo_fp16; soup profile and the MCP profile tool price the bf16 default whatever the card. A run whose auto_mixed_precision picks fp16 on a bf16 card still holds fp32 norms when it trains, but the pre-flight, soup profile and soup plan price it with the bf16 figures, so for it the estimate can sit under the need (upstream's gate-int8-checkpointing-vram.md reads its three such rows at 0.869 to 0.993 of the measured peak after the 8-bit term, "still under the band"). The logits term is unchanged. See Speed and memory.
  • Layer streaming charges two cuBLAS workspaces (#1407, #2749). The budget now includes the two allocator-visible cuBLAS workspaces PyTorch allocates, whose size depends on the card's compute capability and on CUBLAS_WORKSPACE_CONFIG. Upstream states that its former 0.85% accuracy bound no longer applies, that configurations which passed the v0.77.2 pre-flight may now be refused (lower training.batch_size or data.max_length, or use the packed NF4 backward when Soup offers it), and that the evidence promises no bound at other sequence lengths or devices. Layer streaming's packed-state backward (#2655) and its Windows commit-headroom check before page-locking (#2658) are covered on Scaling a streaming run and the disk tier.
  • A run the estimate cannot price names the field that stops it (#2306, #2363, #2444, #2673). soup profile and the MCP profile tool print Cannot estimate this run: training.batch_size is outside 1 to N, the range the estimate prices. (or the equivalent sentence for data.max_length, training.quantization or base). Batch size, sequence length and quantization are checked before the model is read, so a run the estimate cannot price makes no Hub request. The train pre-flight says why the fit is not checked, and training.batch_size: auto gets an informational line. soup profile prints the Hub line soup plan prints.
  • profile_from_config takes seq_len and shape as a Python function (#2871, #2444). seq_len is clamped to 64 up to data.max_length and is used only for a run that pads each micro-batch; shape supplies hidden_size, num_layers, intermediate_size, vocab_size and params when a config.json cannot be read. soup profile --config and the MCP profile tool do not take either argument: the release notes name them, and the code calls the function without them; soup profile --model has --seq. The function returns a truthy FitUnavailable (with .field and .reason) instead of None for a run it cannot price, so a caller must test isinstance(result, dict).
  • What upstream says the estimate still is. It is fitted on small dense models. The 8-bit checkpointing term is calibrated on three of them; gradient_checkpointing: medium is outside the range and only warns; the padded-SFT lift reads at most 20,000 rows or 90 seconds; a distillation step counts as outside the range; and a micro-batch that fills 512 tokens can still need more than the estimate (#2871). Calibration beyond 1,024 tokens per micro-batch is tracked as #3021. The v0.77.x statements above (42 rows, nine terms, a worst error of 0.85% on the streaming grid, "never under-predicts") describe the v0.77.x estimator, not this one.

Where the model's size and shape come from (v0.77.1). The shape comes from its config.json (a local directory, then the Hugging Face cache, then the Hub unless HF_HUB_OFFLINE or TRANSFORMERS_OFFLINE is set) and the exact parameter count from the safetensors headers. Reaching the Hub writes the model's config.json into the Hugging Face cache, and soup train (--dry-run included) can do it without a message when a CUDA card is detected, the run is not streamed and not on MLX, batch_size is a number and the base is a Hub id; only soup plan prints a line first. soup apply and the MCP profile tool never reach the Hub. When no config.json can be read, the shape is guessed from the parameter count, the logits term is not counted and the output says so.

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). Since v0.76.0 soup train runs the gate for all nine; through v0.75.2 the CLI checked only none, 4bit and 8bit (mxfp4 joined in v0.76.0 with the other five, #1631, #1652). fp8 is priced at 2.0 bytes per parameter (it was 1.0), because an FP8 base is dequantized on load and trains in bf16, and a refusal for it adds An FP8 base is dequantized on load, so this estimate prices the bf16 model. Weights are priced at 2.0 bytes per parameter for none, fp8 and mxfp4 under LoRA (a full fine-tune with none is priced at 4.0, its fp32 weights), 0.55 for gptq and awq, 0.5 for aqlm and 1.0 for eetq; under 4bit and 8bit only the decoder's linear layers are quantized (0.53 and 1.02 bytes) and the embeddings and output head are fp32 for training on a card without bf16 hardware (priced so by the soup train pre-flight only) and bf16 (2 bytes a parameter) on a CUDA card with bf16 hardware since v0.78.0 (#2683). When no config.json can be read, the flat 0.5 and 1.0 are used. An hqq:* value has no memory model yet, so the run starts and prints Pre-flight skipped: no memory model for quantization: hqq:4bit instead of staying silent. A config in one of the six newly checked formats that used to start on a card too small for the estimate is now refused; --allow-oom-attempt launches it anyway. No measured error is published for these formats.
  • 4 PEFT modes (full, lora, dora, qlora)
  • Where soup train gets the model size: a local checkpoint is measured from its safetensors headers (since v0.77.0 the checkpoint's own files: the ones model.safetensors.index.json names, else model.safetensors, else the model-*-of-*.safetensors shards, else every *.safetensors except consolidated*. A consolidated.safetensors beside them, the mistral-inference copy Mistral's repositories ship, is no longer counted, and the same rule applies to soup profile and soup cost, #1806, #1906); a Hub id is sized from its config.json and safetensors headers since v0.77.1 (see above). Only a model with no readable config.json is sized from its name (72B, 8x7B read as 46.7B total, an active-parameter marker such as -A22B ignored, 135M as 0.135B), and a name with no size token is still sized as 7B, so on that fallback the gate can pass a run that will not fit: point base: at a local download to have it measured.
  • Bounds: seq_len ∈ [64, 1M], batch ∈ [1, 1024], params ∈ (0, 1000B]
  • Gradient checkpointing keeps one hidden-sized tensor per layer plus one layer recomputed; it does not reduce the logits and loss term, which on a 150k vocabulary is often the largest

soup doctor and soup bench train

Two more checks that run before a GPU hour sit on the Fine-tune Doctor page: soup doctor --config soup.yaml (which settings your config switches on that its backend never reads, and the load refusals of v0.76.0 and v0.77.0, staged fields included) and soup bench train (a short run that fails when the model was not training). soup doctor itself, on a machine with an NVIDIA GPU, also reports each card's compute capability and architecture family (Blackwell, Hopper, Ada, Ampere, Turing, Volta, Pascal), says when the installed PyTorch build has no native or PTX support for it and prints a CUDA-matched reinstall hint, and lists BF16, FP8 and NVFP4 hardware and software support in a Precision features block. That GPU panel was read from the code at v0.76.0 and not run here. On a card with compute capability exactly 12.0 (an RTX 50-series card), v0.78.0 adds a short note (#2587): NF4 on sm_120, bitsandbytes' fused 4-bit GEMM and its dequantize-then-matmul path round differently at small row counts, so NF4 outputs can differ in the last bits between the two, and streamed NF4 follows bitsandbytes' own choice of kernel. That is upstream's statement, read from commands/doctor.py; it was not checked on a Blackwell card here, and a card of any other capability prints nothing. Since v0.77.2 (#2206, by @Nari-Ab) it also names a case where the card is hidden rather than missing: when nvidia-smi sees a GPU, torch does not, and the first entry of CUDA_VISIBLE_DEVICES is not a device index below the GPU count (-1 or an invalid list), the line reads GPU hardware present (<name>) but CUDA_VISIBLE_DEVICES=<value> hides it from torch. Unset CUDA_VISIBLE_DEVICES to use the GPU. and does not advise reinstalling PyTorch. A first entry that starts with GPU- or MIG- is not checked. This was read from the code at v0.77.2 and not run here, because it needs nvidia-smi.

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

  • Fine-tune Doctor — soup data doctor, soup data lint, soup doctor --config and soup bench train.
  • 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.