Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.
Python cliconsumer-gpudpofine-tuningggufhuggingfacellmllmopslocal-ailocal-llmloralow-vrammachine-learningollamapeftpythonpytorchqlorasfttransformers
docs(contributors): #913, #918, #998, #1050, #1064, #1606, #1570, #1130, #1283, #1728, #1726, #1745, #1526, #1743, #1746, #1747, #1748, #1753, #1754 [skip ci]
Alpamys837794f465b0
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 3574d9c5..203f0054 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -128,6 +128,7 @@ Listed by first contribution. PR numbers link the work.- A direct `soup export --format awq` let AutoAWQ silently download its own default calibration set — roughly 214k rows — so an export the user believed was local was network-dependent and calibrated on whatever upstream happened to ship. An explicit local JSONL is now required, and missing, empty or malformed input is refused **before** AutoAWQ is imported and before the model is loaded, so the failure costs seconds instead of a model load. The substance is theirs, in three commits. Three remaining review items — a width-fragile test rewrite, a stale "Unlike `--format awq`" line in the GPTQ refusal that this change itself made false, and the fragment move after v0.74.0 was tagged mid-review — were finished by the maintainer after a publicly announced date passed, and the merge commit names exactly which commits were whose ([#338](https://github.com/MakazhanAlpamys/Soup/issues/338), [#592](https://github.com/MakazhanAlpamys/Soup/pull/592))- `soup ui` opened and printed a URL with no token, so the first tab was `Unauthorized` on first paint. They made the panel and the browser launch use the `?token=` login URL (also under `--no-browser`), and corrected the review's own premise: after #1191 the server, not `app.js`, consumes the token on a loopback bind, so the docs describe the 303 + HttpOnly cookie. 4 of 4 mutations killed, including `--no-browser` being ignored, which the first version of the test could not catch ([#1194](https://github.com/MakazhanAlpamys/Soup/issues/1194), [#1307](https://github.com/MakazhanAlpamys/Soup/pull/1307))- `stream_layers` accepted `use_liger` and `use_flash_attn`, trained, and ignored both, because only the resident setup reads them. They claimed the issue, refused both at config load in the existing conflict list, resolved the issue's second box by pinning the task gate that already covers the streamed preference tasks rather than adding a dead branch, and added a scan test that fails when the streamed setup starts reading either field. When the review showed their "byte-identical" control asserted on pydantic's multi-line rendering and could not fail, they rebuilt it on the raw message (it now fails 6 mutants), fixed the trailing space it had hidden, and took the optional suggestion of naming only the switches that are set. 33 tests (7 of the first 32 fail on `main`), 9 validator mutations killed ([#1692](https://github.com/MakazhanAlpamys/Soup/issues/1692), [#1716](https://github.com/MakazhanAlpamys/Soup/pull/1716))+ - A first QuEST resume from a format-v1 checkpoint read and hashed the whole local base three times, because the resume check re-resolved the `base:` string the run had just hashed. They passed the identity already held instead, and **when review showed their first version compared the metadata's own `base_model` with itself (which can never refuse, and would have accepted a continuation-path resume that `main` refuses), they said so plainly, switched to the identity of `config.base` resolved before the load, and added the continuation-path test that fails on the wrong source**. They also corrected their own earlier evidence, re-measured against a real `main` worktree: 11 of 13 new tests fail there. A `_hash_local_file` call count pins one fewer read per path, and six mutations each fail a named test ([#1199](https://github.com/MakazhanAlpamys/Soup/issues/1199), [#1728](https://github.com/MakazhanAlpamys/Soup/pull/1728))- **Shutaru** ([@Shutaru](https://github.com/Shutaru))- Kept the Transformers SFT import off the MLX dispatch route, so `backend: mlx` cannot reach the PyTorch/TRL stack even if `sft.py` stops being import-light later — and, told the PR did not fix the defect its title claimed, retitled it to match reality rather than defending the framing, leaving [#394](https://github.com/MakazhanAlpamys/Soup/issues/394) open for the unexplained hang. The `mlx-smoke` job it adds asserts mlx is *present*, not merely that torch is absent: the earlier shape went green having executed nothing ([#431](https://github.com/MakazhanAlpamys/Soup/pull/431))- Found and fixed a silent data-corruption bug in assistant-only loss masking: `BatchEncoding` is not a `dict`, so the guard missed and the mask was built from the mapping's **key strings** — no exception, normal loss curve. Split it out of #426 on request, then decided the case the issue asked to be decided rather than inherited: an all-zero mask with assistant messages present is rejected rather than honoured (measured: 0 trained tokens before, 2 after) ([#439](https://github.com/MakazhanAlpamys/Soup/pull/439))@@ -221,6 +222,8 @@ Listed by first contribution. PR numbers link the work.- Removed the `eval_config` that `SoupTrainerCallback` accepted and stored but no code had read since auto-eval moved to `soup train`, together with the builder's pass-through. The two tests that had asserted the dead attribute were rewritten to check the fields the callback really uses, one of them through `GRPOTrainerWrapper.train()`. A second round added an absence assert in each, because restoring the old callback still passed: now that mutation fails 2 tests, the same 2 fail on `main`, and 564 tests across the callback test files pass on a trial merge with `main` ([#1643](https://github.com/MakazhanAlpamys/Soup/issues/1643), [#1654](https://github.com/MakazhanAlpamys/Soup/pull/1654))- `soup autopilot` recommended `mxfp4` for a pre-quantized MXFP4 base whatever the budget, although such a base loads dequantized to bf16, so a 20B model written out for a 16 GB card could only fail at load. It is now budgeted at 2 bytes per parameter, read from the hardware-fit table so the two estimators share one figure, and a smaller `--gpu-budget` is refused with a message that names the dequantization. The second round turned a test that any figure between about 0.8 and 2.4 bytes per parameter would pass into a boundary test at 39.9 / 40.0 GB: 6 of 6 mutations killed, including the shared table entry, against 1 of 5 before ([#1653](https://github.com/MakazhanAlpamys/Soup/issues/1653), [#1656](https://github.com/MakazhanAlpamys/Soup/pull/1656))- `training.lora.use_dora: true` loaded on `backend: unsloth` and `backend: mlx`, where no DoRA adapter is ever built, so the run quietly trained plain LoRA. It is now refused at config load, through the same variant gate as `use_vera`, while mlx with a Quant Menu format keeps its own refusal. Review asked for one docs sentence and suggested a stricter test `match`, and the stricter match proved load-bearing: rewording the refusal message now fails the test, where the original pattern let it through. When the comment they added turned out to break a source-splitting test elsewhere, they reworded it in one push. 1977 related tests passed on the merged tree, and 7 of 8 mutations were killed (the eighth is an equivalent mutant) ([#1651](https://github.com/MakazhanAlpamys/Soup/issues/1651), [#1657](https://github.com/MakazhanAlpamys/Soup/pull/1657))+ - Closed #814: `soup reward stress` tried only four classic junk strings (`empty`, `length`, `repetition`, `sentinel`), none carrying the structure that structure-checking verifiers look for, so the built-in `format` verifier was reported `robust (not gameable)` with exit 0 while `<think></think>a` scores 1.0, and `accuracy`, which scores 0.5 when the expected text appears anywhere in the completion, missed an answer-spray with distractor options. They added structure-preserving families, `wrapped_junk` (think, boxed, JSON and heading scaffolds around padding), `answer_spray` (the gold target among distractors and trailing numbers) and `structure_without_content` (empty schema and tool dictionaries), seven families in all, and made every family produce several distinct variant attempts instead of one string (or one identical string per gold), with `answer_spray` substituting sampled gold answers. **The part worth copying is that the PR shows both directions**: `soup reward stress format` now reports `GAMEABLE` and exits 2, `accuracy --references` flags the spray at 100% acceptance and exits 2, and `verifiable --verifiable-domain math` still reports `robust (not gameable)` and exits 0. The `--attacks` help and `docs/training.md` / `docs/commands.md` name all seven families; the new `tests/test_issue814_reward_stress.py` covers the five acceptance criteria, and `test_v07141.py` and `test_cli_startup_is_light.py` stay green ([#814](https://github.com/MakazhanAlpamys/Soup/issues/814), [#918](https://github.com/MakazhanAlpamys/Soup/pull/918))+ - Closed #1744: `deploy measure` kept its own copy of the OK / MINOR / MAJOR ladder and compared the raw float drop with the thresholds, so a drop computed from exact task counts could land a hair under its boundary - 19/20 -> 18/20 (`-0.04999999999999993`) was MINOR instead of MAJOR, 47/50 -> 46/50 (`-0.019999999999999907`) was OK instead of MINOR. They deleted the second ladder and made `measure_candidate` call the shared `classify_delta`, which rounds the drop with `round(-delta, 9)` before either comparison (the same rounding change #1743 makes for `soup eval quant-check`), and said in the PR why they chose the shared call over patching the copy. **The part worth copying is that the tests carry the float noise themselves**: they are built from counts, check each case through both the `before_gen` and the `before_score` route, assert the raw delta values, and run the end-to-end `soup deploy autopilot --measure` path with the cache isolated through `SOUP_DEPLOY_AUTOPILOT_CACHE`, so removing the fix fails that test on every run. The fragment states the one limit: caches written before the fix keep their stored verdict until cleared. 17 tests in the new file, 259 passed and 1 skipped across seven related files, and dropping the rounding fails 7 tests; the four cases 1e-7 from a threshold only document where it sits and pass either way ([#1744](https://github.com/MakazhanAlpamys/Soup/issues/1744), [#1748](https://github.com/MakazhanAlpamys/Soup/pull/1748))- **AmixDigital** ([@Amix29](https://github.com/Amix29))- Gave `soup monitor` a real Apple Silicon path, where it had reported nothing but an NVIDIA-shaped blank since v0.44.1. The security work is the part worth naming: fixed absolute executable paths so `PATH` cannot influence what runs, `sudo -n` that never prompts and never reads a password, stderr pattern-matched for permission markers but never printed, and a parser that returns `[]` against a billion-laughs entity bomb, an XXE `file:///` reference, 5,000-deep nesting and embedded NUL bytes. **Three guards had no test holding them up and they closed all three in twenty minutes** — most importantly the call site that decides which implementation every Linux and Windows user gets, where `if True or detect_apple_silicon()` had left 126 tests passing. Their oversize-payload test had also been asserting on `b"x" * (CAP + 1)`, which is not a valid plist and returns `[]` whether the cap exists or not; they rebuilt it around a valid oversized document. The test file shrank by 18 lines and **every deletion was an upgrade** — membership assertions became adjacency assertions. Asked to confirm the live plist schema, they said plainly that the Mac is not theirs and they cannot authenticate `sudo`, rather than guessing — while confirming the two things they could check against the real binary ([#481](https://github.com/MakazhanAlpamys/Soup/pull/481))@@ -369,6 +372,8 @@ Listed by first contribution. PR numbers link the work.- Filed #1393 from the #1145 measurements and then fixed it: DPO built `AutoModelForCausalLM` whatever `modality` said, so a vision-language wrapper checkpoint (MiniMax-M3) could not load in DPO. They gave the DPO wrapper SFT's vision path (processor, pad-token mirror, vocab expansion through the processor's tokenizer, LoRA on the language tower) and **answered the open trl question by measurement**: a real DPO step on a tiny LLaVA showed trl keys its vision collator on an `images` column, not on the processor, so text-only preference rows train. Review found the preflight answered DPO + `audio` wrongly (a green verdict for a config the trainer cannot load) and missed a `preference_loss_weights` blend led by dpo in both the preflight and the unsloth refusal; the fix was one per-trainer modality map plus resolving the blend by its largest weight in both places, with a control test against widening the refusal, and their re-measured mutation counts reproduced exactly. 17 of 19 mutations killed (the two survivors only change an equal-weight tie, which I recorded rather than blocked on), 111 tests in the two PR files, 2531 on a trial merge with `main` ([#1393](https://github.com/MakazhanAlpamys/Soup/issues/1393), [#1707](https://github.com/MakazhanAlpamys/Soup/pull/1707))- Closed #1197, which they filed and measured: `training.moe_lora: true` with `lora.use_vera: true` adapted the attention projections exactly as VeRA without the flag did and still printed `ScatterMoE LoRA: targeting 7 module patterns`, because peft's `VeraConfig` wraps `nn.Linear` modules only and a transformers-5 MoE keeps its routed experts as fused 3-D parameters. **The part worth copying is that they took the maintainer's correction on their own numbers and kept the shape the data pointed to**: their 12 / 4 counted `lora_A` names (two per adapted layer), the true figure was 6 layers with 2 on experts, and Mixtral is fused at the transformers floor too, so the check is "VeRA wraps no routed expert", not #798's predicate. They claimed the issue, waited for #1590 to land because the refusal reads its `find_fused_expert_parameters`, and opened the PR rebased on it. The refusal sits in `resolve_moe_lora_targets` ahead of the dropout rule, so every MoE-wired trainer reaches it without a call-site change; it names both flags, the fused parameters and the two ways out, and leaves `use_vera` without `moe_lora`, a dense base and a one-`nn.Linear`-per-expert checkpoint alone. 15 tests on tiny real Qwen3-MoE, Mixtral, MiniMax and Qwen2-MoE models, 6 of them failing on `main`, including a refusal driven through the real DPO setup; on the head 3237 passed across 52 related files and all 11 source mutations are caught. One had survived their own set of five: nothing asserted the second way out in the message, and it took one assertion ([#1197](https://github.com/MakazhanAlpamys/Soup/issues/1197), [#1723](https://github.com/MakazhanAlpamys/Soup/pull/1723))- Closed the two mutation survivors left by the review of #1707 with a test-only follow-up: an exact-weight `preference_loss_weights` blend is now pinned to follow its first-listed loss in both the loader pre-flight and the unsloth vision refusal, the way the trainer already breaks the tie; making either site prefer the last-listed loss fails exactly its new test ([#1393](https://github.com/MakazhanAlpamys/Soup/issues/1393), [#1739](https://github.com/MakazhanAlpamys/Soup/pull/1739))+ - Built the `gpu` marker for #833 and left its fourth item open rather than fake it: they had no CUDA card (an Apple M1, MPS only), so `benchmarks/gpu-test-runs.md` is seeded only from the two runs already published (H100, RTX 5070 Laptop) and says neither was a `-m gpu` run. `tests/conftest.py` now holds the one `cuda_available()` probe and a `pytest_runtest_setup` hook that skips `gpu` tests without CUDA and keeps the marker's `reason=`; `gpu` is registered in `pyproject.toml`; 15 private probes and nine identical `requires_cuda` definitions are gone; `CONTRIBUTING.md` gained a "GPU Tests" section. **The part worth copying is how a GPU criterion is held without a GPU**: `tests/test_issue833_gpu_marker.py` scans every file under `tests/` with the AST and rejects a private `cuda.is_available()` probe, a `skipif` on `cuda_available()` and a `pytest.skip` inside an `if` on it, fed every probe style `main` had and required to see more than 500 modules. They also compared the full suite on `main` and on the branch against `pytest -m gpu --collect-only` (79 CUDA skips on `main`, one not selected: a test they split so its CPU half now passes), found a CUDA skip in `test_v0403_part_a.py` that could never fire once a stub had patched `is_available`, and reported a regression of their own (an import below a module-level MPS skip, caught on the Mac). 22 tests in the new file; 13 mutations, all killed, one only by a setup crash that they say is not an assertion kill; no assertion was removed or weakened across the 157 removed test lines. Not run on a CUDA card, and the optional self-hosted GPU runner job is not included ([#833](https://github.com/MakazhanAlpamys/Soup/issues/833), [#1050](https://github.com/MakazhanAlpamys/Soup/pull/1050))+ - Bounded `soup expect`'s unknown-key refusals as the follow-up agreed in the #1499 review: a suite with 90,000 unknown top-level keys produced a 900,058-character message, and now names the first ten keys and reports the rest as `and N more` (173 characters). Messages with ten keys or fewer stay byte-identical (22 of 22 compared). When review found that the cap was pinned at 10 and 50 keys but not at 11, they added a 9/10/11 parametrization at both levels that catches the off-by-one mutation. 208 passed on the merged tree; 9 of 9 non-equivalent mutations caught ([#1499](https://github.com/MakazhanAlpamys/Soup/pull/1499), [#1570](https://github.com/MakazhanAlpamys/Soup/pull/1570))- **Sohaib Kamash** ([@Nick-800](https://github.com/Nick-800))- Added seven validated Qwen2.5-Coder, Qwen2.5-Math, and DeepSeek-R1-Distill-Qwen SFT recipes; synchronized all catalog-count sites and repaired the Mistral Small model identifier. Literal repository IDs and per-recipe learning rates are now load-bearing assertions ([#536](https://github.com/MakazhanAlpamys/Soup/pull/536)).@@ -393,6 +398,7 @@ Listed by first contribution. PR numbers link the work.- Closed #1718: `soup eval benchmark` started each tracker row from `score = 0.0`, so a benchmark that was missing from the lm-eval results, or present without a numeric metric, was stored as a measured zero and then reported as saved - and `soup eval compare` and `soup eval leaderboard` take the newest row per benchmark, so that zero replaced a real score. They took the accepted contract exactly and did not widen it: skip, name and count the unmeasured names (never refuse the whole run over one task), print the banner only when a row was saved and carry the count (`2 of 4`), exit 1 when nothing was saved, keep a real `0.0`, refuse a `bool` as a score (the `isinstance(True, int)` trap), and treat a group like any other requested name without saving its sub-tasks. **What makes it worth keeping**: the results table and the tracker now share one metric selector, so they can no longer disagree about what was measured, and the tests drive the real CLI against a real SQLite file with only lm-eval's reply stubbed, with the colour-stripping helper shown to be load-bearing under `FORCE_COLOR=1`. The only existing test touched was the trust-forwarding double, which changed its return value and nothing else. 20 tests; 17 of 17 mutations of the contract (each skip, the bool rule, the zero rule, the banner, the count, the exit code, the `for_terminal` routing at three sites, the group rule) are killed by a named test ([#1718](https://github.com/MakazhanAlpamys/Soup/issues/1718), [#1722](https://github.com/MakazhanAlpamys/Soup/pull/1722))- `soup eval human` let a JSONL string or array that contained `"prompt"` through its loader, built both model generators, and then died with a `TypeError`. They reported it with a run of the real command, proposed and agreed a narrow scope before writing code, and added the object guard with the wording `eval/custom.py` already uses, so the error names the line before any model is loaded. 14 tests, including a CLI spy that no generator is built for a bad row; removing the guard fails 12 of them ([#1725](https://github.com/MakazhanAlpamys/Soup/issues/1725), [#1727](https://github.com/MakazhanAlpamys/Soup/pull/1727))- The custom-eval scorer `tool_call_args_subset` gave full argument credit to malformed tool-call arguments (`"not-json"`, `[]`, `null`, a number) whenever the gold call expected none, because a failed parse was collapsed into an empty object. They reported it with a probe on the real scorer, asked how malformed arguments should be treated before writing code, and withheld argument credit only for a present-but-invalid payload, leaving valid empty objects, an omitted field, the weights and the threshold as they were, each pinned. 22 tests; removing the fix fails 8 of them ([#1734](https://github.com/MakazhanAlpamys/Soup/issues/1734), [#1737](https://github.com/MakazhanAlpamys/Soup/pull/1737))+ - Closed #1740, the `quant-check` verdict that moved with float round-off: 19/20 -> 18/20 subtracts to `-0.04999999999999993`, so an exact five-point drop was MINOR and the command exited 0 instead of 2 (and an exact two-point drop was OK). They took the accepted policy as written - round the drop inside `classify_delta` for BOTH thresholds, not a looser threshold - and left the defaults, the scores, the raw JSON `delta` and the schema alone. **What makes it worth keeping**: the tests start from task COUNTS rather than literal deltas (the existing boundary tests all passed because they used `-0.05`, which is why the bug survived), they add 1e-7 near-boundary controls that stop the rounding from becoming a looser threshold in disguise, and one set runs the real `quant-check --format json` command with only the generators stubbed, asserting verdict and exit code and comparing the CLI row with the core row. 19 tests, 6 of them fail on the previous source; 10 of 10 mutations (no rounding, rounding at only one threshold, looser defaults, rounding to 1 / 2 / 3 places, the exit mapping dropped or exiting 1) are killed by a named test ([#1740](https://github.com/MakazhanAlpamys/Soup/issues/1740), [#1743](https://github.com/MakazhanAlpamys/Soup/pull/1743))- **k4its1t** ([@k4its1t](https://github.com/k4its1t))- First contribution, picking up where #497 stopped one day earlier. The dtype scanner's predicate already matched anything starting with `AutoModel`, so every `AutoModelFor*` load was covered and the surviving hole was **concrete, non-Auto** classes: `Qwen2VLForImageTextToText.from_pretrained(..., dtype=)` or `BertForMaskedLM.from_config(..., dtype=)` were invisible and would have shipped a kwarg that TypeErrors below the declared transformers floor. Four suffixes, a focused regression test each, both load methods. **Their own mutation claim was the coarse one -- removing all four suffixes makes four tests fail -- and removing them one at a time is stronger than they claimed**: each single removal produces 1 failed, 15 passed, so every named test is the sole guard for its own suffix rather than the four reddening together. The two things I check on any widening they got right: the four existing false-positive controls survive untouched (a guard that fires on correct code is one people delete), and all six deleted lines are a rename plus reworded docstrings, not a test. The rename `_is_transformers_model_load` -> `_is_dtype_guarded_model_load` describes the contract being enforced instead of implying every matched class comes straight from transformers. **Scope was not oversold, which is why it is worth writing down**: none of the four suffixes appears in `src/` today and the scanner reports zero live hits, so this is prospective -- Whisper loads as `WhisperForConditionalGeneration` and #497 already covered it. Timely prospective work, though: concrete vision classes are exactly what #488, #501 and #502 are moving through right now ([#500](https://github.com/MakazhanAlpamys/Soup/pull/500))@@ -423,6 +429,7 @@ Listed by first contribution. PR numbers link the work.- Published the STEP 9 mechanism reproducer behind the layer-streaming NF4 record, the five-arm harness that shows the defect is aliasing of the recycled buffers and that neither the packed weights nor the quantisation state alone is enough. It took six review rounds: as first submitted it crashed on its first pooled acquire; the repair then overflowed, so its "exact" column was `inf == inf` arithmetic that happened to land on the record's counts; the clone baseline was compared against a copy of itself and could not fail; a non-finite run under `--bypass-pool` exited 1, the same code as "negative control caught"; and five verdict rules were reached by no test. **The part worth keeping is the last two rounds**: they gave the overflow its own exception and exit code 3, made the full clone match a resident run that bypasses the pools (so a clone that is 1.5x off or drifts between repetitions now exits 1), and then wrote five per-arm tests that each drive the real `main()` to the rule they name. 17 CPU tests; 14 of 17 mutations of the harness fail them, and the 3 survivors are named rather than hidden — one verdict message that a neighbouring rule makes redundant for the exit code, one display-only count and one equivalent mutant. They said plainly that they had no CUDA device to run it on ([#379](https://github.com/MakazhanAlpamys/Soup/issues/379), [#1119](https://github.com/MakazhanAlpamys/Soup/pull/1119))- `soup infer` was documented as batch inference but generated one prompt at a time. They added an opt-in `--batch-size` that renders each prompt through the shared template path, left-pads, generates once per batch and writes rows back in input order, with token counts that stop at the first EOS or pad, so short rows are not inflated, plus a refusal of `--cuda-graphs` above batch 1. **The review rounds were about proving order, and they got there**: their prompt-dependent pairing test, where the fake model answers from each row's own content with mixed lengths and early stops, kills the length-sort and reversed-batch mutations that position-only tests could not see. 79 tests in the two infer files (21 fail on `main`), 14 of 14 behavioural mutations killed ([#765](https://github.com/MakazhanAlpamys/Soup/issues/765), [#1083](https://github.com/MakazhanAlpamys/Soup/pull/1083))- Published the STEP 2b determinism reconstruction (`benchmarks/harness/determinism.py`): forward twice, backward rep 1 vs rep 3 and a trained 5-step curve twice, streamed NF4 against a resident NF4 reference, with the record's asymmetry as the verdict. Over four rounds it went from a validator of hand-written JSON (where a `null` read as the defect) to an in-process measurement. **The fix that mattered** was ordering: the historical control has to be installed before the streamed model is built, or the harness measures the repaired path. It now goes through `build_streamed_arm(..., "control", ...)` and restores the control in a `finally`, and a `main()` test pins both, so swapping in the clone arm or dropping the restore fails it. Six of its 20 CPU tests drive the real measurement path. Not run on CUDA ([#379](https://github.com/MakazhanAlpamys/Soup/issues/379), [#1286](https://github.com/MakazhanAlpamys/Soup/pull/1286))+ - Closed #1616, which asked that a layer cache whose files were rewritten for other settings is never reported reusable for the old ones, and that files the index no longer names are reported. After the maintainer's correction in the thread (a content-changing interrupt must be a miss; only a layout-only re-shard may keep the old index) they made `index.json` move to `index.json.resharding` before the first write of a re-shard whose dtype, quantization, source fingerprint, external policy or format differs, so the next run reports `previous re-shard did not finish` and re-shards; the marker is removed only after the new index is committed. **The part worth copying is the interrupts**: the tests stop `_atomic_save` after two layers and `_atomic_write_index`, on one root and on a striped cache, and the layers-interrupt tests check that every layer file is float32 after the next run, rather than asserting on the marker alone. Part 2 reports unindexed `layer_*.safetensors` and `.soup.*.tmp` files with their size through `for_terminal` and deletes none of them; the tests include a three-root layout, an interrupt between the index commit and the deferred delete, and a stripe folder named `stripe-[bold]`. The PR said plainly that three setup tests needed `peft`, which was not installed. 22 sharder tests and 686 across 14 related files pass; removing the quarantine call fails 4 and flipping its predicate fails 6; the four predicate terms double_quant, quant_device, external_mode and format_version are not pinned by a test ([#1616](https://github.com/MakazhanAlpamys/Soup/issues/1616), [#1747](https://github.com/MakazhanAlpamys/Soup/pull/1747))- **chadetov** ([@chadetov](https://github.com/chadetov))- First contribution, and it is the kind that is easy to file as a one-line fixture tweak and much harder to *diagnose*: `test_sft_smoke` had been red since v0.36.0, and they traced why nobody knew. `pyproject`'s `addopts` carry `-m 'not smoke'`, and the only smoke job in CI is `mlx-smoke`, which selects `-k mlx_sft_smoke` on an install that asserts the PyTorch stack is **absent** — so `test_sft_smoke` and `test_dpo_smoke` run in neither the default suite nor CI, which is how a fixture drifted out of sync with a hard error added five releases earlier. **The scope discipline is what got it merged unchanged**: the MLX fixture carries the same `format: chatml` line and they left it alone, because it reaches the MLX trainer rather than `sft_format.py` and is the one smoke test CI actually runs and passes — verified, not assumed. They also declined to wire the PyTorch smoke tests into CI in the same PR and said why (model downloads, runner minutes), leaving the call to the maintainer instead of taking it ([#594](https://github.com/MakazhanAlpamys/Soup/pull/594)). Separately, and on the same day, they measured `utils/log_level.py`'s branch coverage on #273 and filed [#595](https://github.com/MakazhanAlpamys/Soup/issues/595) — four code sites quoting a probe-denominated VRAM ratio under a "real peak" label, plus a schema field description still carrying a justification the gate record had explicitly withdrawn@@ -462,6 +469,7 @@ Listed by first contribution. PR numbers link the work.- `soup data forge --judge-provider anthropic --judge-base-url <x>` and `soup data recipe --provider anthropic --base-url <x>` blamed a failed Anthropic call on `<x>`, in the terminal and in the recipe's `.checkpoint.json`, although Anthropic ignores that flag and every request goes to `https://api.anthropic.com/v1/messages`, so an outage pointed the user at a host that was never contacted. They fixed it in the one shared label helper, so a single change covers both commands, and **built the label from the same constant the POST now uses, normalising the provider exactly as the dispatcher does**, so the message and the call cannot disagree on a spelling like `Anthropic`. In review the CLI tests were changed to record the URL actually posted to. Two mutants that had survived (POST sent elsewhere, Anthropic honouring `base_url`) went from 0/8 to 2/8, and they re-ran both themselves before pushing. 8 new test items, 6 of them fail on `main`; eight behaviour-changing mutations, eight killed ([#1340](https://github.com/MakazhanAlpamys/Soup/issues/1340), [#1370](https://github.com/MakazhanAlpamys/Soup/pull/1370))- Found that the Hub dependency in the test suite was several times larger than the grep estimate in the issue: with the network blocked and an empty `HF_HOME` they ran the real sweep, posted the failure list before touching anything, and showed 76 tests across 10 files downloading tiny models for nothing they check. Replaced each download with a locally trained byte-level tokenizer and a randomly initialised tiny GPT-2/Llama, then consolidated ten copies of the builder into one shared helper that removes its temp directory at exit, keeping file-local only the two models whose shape the tests vary. The 10 files go from 53 failures + 24 errors offline on `main` to 495 passed, no leaked directories, and 9 of 9 mutations of the code under the rewritten tests are killed ([#1356](https://github.com/MakazhanAlpamys/Soup/issues/1356), [#1544](https://github.com/MakazhanAlpamys/Soup/pull/1544))- Made a layer-stream shard re-check each stripe folder's real path before every layer write and before the marker write, where before it was checked once at the start, so a stripe root renamed and swapped for a link mid-shard now stops the shard by name instead of receiving the remaining layers. They also refused a directory junction as a stripe root while still accepting a genuine Windows volume mount point, telling the two apart by link target because both carry the same reparse tag, and made a reparse point that is neither refuse by name instead of raising a bare `ValueError`. They reused the existing `stripe_folder_problem` rather than writing a second check, state plainly that this narrows the window to one write and does not close it, and re-applied the junction rule inside #1628's new `check_stripe_root` without editing a test. Ten mutations, ten killed; 192 stripe and early-validation tests pass on the final head ([#1614](https://github.com/MakazhanAlpamys/Soup/issues/1614), [#1663](https://github.com/MakazhanAlpamys/Soup/pull/1663)).+ - Closed #979: `docs/commands.md` and `docs/training.md` documented four `soup train --minillm-*` flags (`--minillm-enabled`, `--minillm-teacher-mix-ratio`, `--minillm-pretrain-anchor-weight`, `--minillm-pretrain-anchor-path`) that do not exist, so copying the documented command gave `No such option` and exit 2; only `--minillm-on-policy` is real. They confirmed it against the live Typer tree, took option 1 of the issue (show the `soup.yaml` fields in the `# training:` comment-block style the docs already use) and made the second `training.md` example say that `minillm_enabled: true` still has to be set in the config. **The part worth copying is the guard**: `tests/test_issue979_documented_cli_flags_exist.py` reads `soup train`'s real options from `typer.main.get_command(app)` rather than from `--help` text, so terminal width and Rich rendering cannot move it. Building it, they caught a false positive of their own regex on `docs/commands.md:237` (a trailing description naming `soup bom emit --energy`; each line is now cut at the first gap of two spaces) and found eight more documented flags that do not exist, in the ULD strategy, RL mid-epoch checkpointing and echo-trap detection; they filed those as #997 and pinned them in an allowlist whose own test fails once one is wired without leaving the list. The guard is shown to fail twice, on a synthetic reintroduced `--minillm-enabled` and by reverting `docs/commands.md:316` to the broken flag. 4 of 4 new tests pass and 90 of 90 in the four neighbouring doc-consistency files ([#979](https://github.com/MakazhanAlpamys/Soup/issues/979), [#998](https://github.com/MakazhanAlpamys/Soup/pull/998))- **MKnaomi2** ([@MKnaomi2](https://github.com/MKnaomi2))- Made `soup doctor` recommend a CUDA wheel the driver can actually run, instead of telling everyone to install `cu121`. **The fallback directions are argued, not defaulted**: an unreadable `nvidia-smi` header falls back to `cu121` rather than the newest tag, because a parse failure most likely means an old driver and a too-new wheel is the failure mode that *looks* like success — pip installs happily and CUDA initialisation dies later. They also verified every tag the mapping can emit against the real PyTorch index **with a negative control** to defeat soft-404s. Review found one blocking defect and it is the interesting one: their first tests asserted `"cu121" not in advisory`, which matches the **installed torch version string** rather than the recommendation — so they passed in CI, where torch is CPU-only, and failed on every machine with a CUDA build, the same green-on-the-runner shape that has reddened this repo four times. They fixed it by asserting on `whl/cu121` **and adding a test that pins the trap**, so the naive form cannot return. All four non-blocking items landed in the same push, including the CWE-427 absolute-path resolution of `nvidia-smi` and the stale `cu121` advice in `README.md` ([#612](https://github.com/MakazhanAlpamys/Soup/pull/612))@@ -527,6 +535,7 @@ Listed by first contribution. PR numbers link the work.- Twice a streamed LoRA run saved an adapter that reloads as nothing — v0.72.0's `.inner.` keys, then #1005's 0-tensor file under peft 0.21.0 — and training reported success both times. Every streamed save, each `checkpoint-*` and the final one, now reads the written file's keys back and raises, naming the file and both counts, on a missing file, a LoRA tensor count other than the model trained, or an `.inner.` key. **The reference is the design decision**: no streamed save is legitimately empty, so the check compares against the trainable count rather than a bare `> 0` and catches a partial adapter too, and the final save is checked on its own because `save_model` dispatches no `on_save`. Their #1005 mutation test makes the guard fire on peft 0.21.0 and skips, saying so, on a peft where the mutation is inert instead of passing vacuously. All seven mutations fail tests, including the `should_save` gate that keeps a distributed streamed run alive at its final save ([#1011](https://github.com/MakazhanAlpamys/Soup/issues/1011), [#1031](https://github.com/MakazhanAlpamys/Soup/pull/1031))- With `stream_layers: true` on an untied checkpoint, the Llama-3-8B-class shape, `dpo` and `kto` crashed inside `trainer.train()`: `embed_tokens` and `lm_head` share one device slot, the head handed autograd a view of it, and the reference forward refilled those bytes before the policy backward. The head now takes a private copy of its weight only when the slot is shared and the loss runs a reference forward before its backward, and the VRAM pre-flight charges that copy for exactly those runs, so its never-under-predicts contract holds. **Where the decision lives is the part worth copying**: a trainer flag, because the trainer is the one thing that knows whether a second forward runs before the backward, so `sft`, `orpo`, `simpo` and the embedding keep the view and pay nothing (the SFT half was @VanshSharmaPES's catch in #1174). Without the fix `dpo` and `kto` fail with the issue's error verbatim; 18 of 19 mutations killed, the survivor equivalent ([#1049](https://github.com/MakazhanAlpamys/Soup/issues/1049), [#1061](https://github.com/MakazhanAlpamys/Soup/pull/1061))- With `expand_layers` set, `freeze_trainable_layers` was read only for its sign: under full fine-tuning `1`, `2` and `4` trained the same appended blocks and `0` or a negative value silently trained the whole expanded model, while the released field description promised top-N / bottom-N. Following the route-1 ruling, any value other than `expand_layers` is now refused at load, naming both fields and the value to set, and the description, the `block_expansion.py` docstrings and both docs pages now say the value must equal `expand_layers`. **The test worth copying is the one through the real `SFTTrainerWrapper.setup()`**: it compares the `requires_grad` set from `named_parameters()` with the appended blocks, so it fails when the freeze is skipped, leaves one new block frozen or leaves the embeddings trainable, not only when a helper returns a different number. 17 of 18 mutations killed, including all five the ruling listed ([#1409](https://github.com/MakazhanAlpamys/Soup/issues/1409), [#1586](https://github.com/MakazhanAlpamys/Soup/pull/1586))+ - Followed through on the refactor they proposed on their own #741 once #737 had landed: the trl `init_kl_coef` -> `kl_coef` rename is the fourth trl rename Soup handles, so it now goes through `trainer/_trl_compat.py`, the module that exists for those, instead of a signature mapping built in `setup()`. A new `kl_penalty_kwargs(config_cls, kl_penalty)` sits next to `prompt_length_kwargs` on the same `config_accepts` probe, the new name wins when a config accepts both, and an empty dict (neither accepted) leaves the setting reported as `(not forwarded)` rather than guessed at; `_set_ppo_training_kwargs` now takes the config class, so all three PPO renames (`num_train_epochs`, `num_ppo_epochs` / `ppo_epochs`, the KL coefficient) use one capability probe. **The part worth copying is that the PR states it changes nothing and then shows it**: the constructed kwargs, the `applied` field names and the printed schedule are identical, every assertion from #737 is kept (the name mappings became config classes accepting exactly those fields), and #737's `test_setup_passes_current_schedule_to_trainer` passes unchanged. New cases cover the modern name, the legacy name, both names and neither; preferring `init_kl_coef` fails two tests. 11 passed and 1 skipped (trl is not installed on their machine; that test is CI's), 399 passed across the PPO-touching suites, and the 24 failures there are identical on unmodified `main` ([#913](https://github.com/MakazhanAlpamys/Soup/pull/913))- **Thanniru Sai Teja** ([@iam-saiteja](https://github.com/iam-saiteja))- Made `soup data validate` single-pass with type-tagged row signatures — and the reason this is worth reading is the recovery, not the speedup. The first revision was written against a pre-#712 copy of `validator.py`, so it silently reverted that fix and `soup data validate` went back to reporting `3/3 rows valid` on a file the loader drops two thirds of; twenty existing tests said so. **They then did more than was asked on the second finding**: told that a test pinning both copies of the join-separator arithmetic would be sufficient, they removed the duplication instead, so one helper now serves both functions and mutating it fails two tests where the second copy had survived +0 failures across 1432. The `_to_hashable` collision class ({"messages": []} and {"messages": {}} both canonicalising to `()` and reporting as duplicates on real chat data) is closed and verified over a 184-case differential harness across all eighteen formats. **And they corrected their own number rather than defending it** — the benchmark now interleaves the two implementations instead of timing them sequentially, reporting 1.34x-1.57x, where the version first shipped printed a *slowdown* for a change that was faster. Unrequested scope, said so at the time ([#771](https://github.com/MakazhanAlpamys/Soup/pull/771))@@ -541,6 +550,7 @@ Listed by first contribution. PR numbers link the work.- Built the CodSpeed trip-wire for `config/schema.py`'s import cost, the dominant leaf of `soup version`'s cold start that they measured in #780. It is one pytest-codspeed benchmark in its own non-required workflow, off until a repository variable enables it and never run on fork PRs, with no stored secret. **They corrected their own proposal in public**: the CodSpeed App's real permissions were far wider than the "read access" they had first described, so they listed them from the App's registration and left the install decision to the maintainer. The benchmark says in its own docstring what it does not measure, and the isolation test that guards its `sys.modules` restore kills all 4 mutations tried ([#1065](https://github.com/MakazhanAlpamys/Soup/issues/1065), [#1086](https://github.com/MakazhanAlpamys/Soup/pull/1086))- Took the layer-streaming runtime off `soup version`'s import path, using the third option from #780, which they re-measured before proposing it. `config/schema.py` imported ten bounds from `layer_stream`, `async_disk_source` and `ship_verdict`, so every CLI start loaded six modules (`layer_stream`, `layer_shard`, `async_disk_source`, `safetensors_reader`, `queue` and `_queue`) to read ten numbers and two tuples. A dependency-free `utils/config_bounds.py` now holds them and the runtimes re-export it, so the schema bound and each runtime message stay one object. **They stated the saving at its honest size**: about 1.6% of `import soup_cli.cli`, with a wall-clock A/B inside the noise. They named the 22-25% drop in `import soup_cli.config.schema` on its own for what it is, the #780 trap in miniature rather than a win. **They also corrected my suggestion on #780**: an `is` check per re-export cannot see a copied `MAX_NOISE_FLOOR_RUNS = 10`, because CPython caches small ints. So the re-exports are pinned on the source text instead, counting every name bound in store context, the schema's included. Verified: config schemas, values and runtime messages are byte-identical to `main`, and CLI import goes from 526 to 521 modules, with exactly those six leaving. The 78 related test files pass, and all 12 mutations are killed, five of them only after the review round widened the guards ([#780](https://github.com/MakazhanAlpamys/Soup/issues/780), [#1368](https://github.com/MakazhanAlpamys/Soup/pull/1368))- Reworded the shipped Turkish and Arabic READMEs to remove false friends and calques ("issue", "Serving", "gated", "wheels" had been rendered with words that mean something else), and kept the PR to what he can read: when asked who the "native-speaker" reviewers were he said they were LLMs, listed what a person had actually read (Turkish natively, Arabic at an upper-intermediate level, Japanese lower-intermediate), and split the Japanese part out himself. **The detail worth copying is the restraint**: he dropped his own `training.lora` code span from the Japanese file as soon as it was shown that the English sentence has none, and rejected the reviewers' decimal-comma suggestions because the ratchet keeps `README.md`'s digits. 93 changed lines compared removed against added show no difference in code spans, URLs, link targets, numbers or tags; the sync test gives 31 passed on the head, on `main` and on both merge orders with #1680 ([#1681](https://github.com/MakazhanAlpamys/Soup/pull/1681))+ - Picked up the two non-blocking follow-ups from the review of their own #1020. `_without_exempt_bodies` in `tests/test_readme_translation_sync.py` is now fence-aware, mirroring `_sections()`: a `## ` line inside a fenced code block no longer starts the exempt-body skip, which would have dropped the rest of that section, headings included, from the stamp hash. **The part worth copying is that the PR says the defect is not live**: `README.md` has no `## ` line inside a fence today, so `readme_sha256` is unaffected on the current file, and `test_a_heading_line_inside_a_fence_does_not_start_the_skip` shows it on a synthetic tree and fails against the pre-fix function (confirmed by reverting the fix locally). The module docstring now also records the caveat that lived only in #1020's PR body: the `What's New` exemption does nothing for an edit confined to another section, as #853 (`Common Commands`) and #1014 (the banner and `Citing Soup`) showed, and no contributor document mentions the sync obligation, so the docstring is its only durable home. 37 passed across the sync and version-sync test files (30 on `main`), ruff clean, and no changelog fragment because the change is test-only, following #1020 ([#1064](https://github.com/MakazhanAlpamys/Soup/pull/1064))- **KJO92** ([@Konuktor](https://github.com/Konuktor))- Stopped every in-process inference path from prompting a tuned model with a sequence it never trained on. `soup chat`, `soup serve`, `soup infer` / `soup bench`, `soup diff`, the `--mole` decoder, `soup data generate` and the `live_eval` generators behind `soup ship` / `diagnose` / `advise` all rendered the chat template to text and then let the tokenizer add its own special tokens, so a Llama-3 / Gemma / Mistral template produced a **doubled BOS** while Soup's default SFT path trains with one, and Soup's own `data.chat_template` presets (which render none) were prompted with one. **The design choice worth copying is the rule they chose over the obvious one**: not "drop a duplicate BOS" but "text a template rendered gets no tokenizer special tokens" — a startswith-BOS check would have fixed the vendor case and silently missed the presets, which need 1 -> 0, not 2 -> 1. `fallback_on_error` is keyword-only with **no default**, so none of the seven call sites could quietly inherit a different error contract, and four hand-rolled copies of the legacy fallback prompt were deleted rather than fixed a fifth time. 62 offline tests over a real fast tokenizer with a genuine BOS/EOS post-processor (30 of them red on `main`), a train/infer prefix property, and an AST ratchet with controls proving it can fail. They reported running 24 mutations; I re-ran three myself and all three were killed — the encoder reverted to pre-fix behaviour failed 23 tests. A first contribution ([#781](https://github.com/MakazhanAlpamys/Soup/issues/781), [#782](https://github.com/MakazhanAlpamys/Soup/pull/782))@@ -671,6 +681,7 @@ Listed by first contribution. PR numbers link the work.- The `gpu` test marker asked whether torch was *built* with CUDA, so under `CUDA_VISIBLE_DEVICES=""` on a machine with a card every gpu-marked test ran and failed in CPU-only bitsandbytes instead of skipping. The fix is subtler than the issue first proposed: a test that initialises CUDA flips `device_count()` from 0 to 1 mid-session, so the count is now pinned once at conftest import, before any test can touch CUDA, and used only by the marker, leaving `cuda_available()` to the test bodies that pick a device with it. **Both directions are checkable on a CI runner with no GPU**: child processes fake `torch.cuda` before the conftest is imported, and the hook tests turn a skip into a failure, so reverting the fix line fails two tests on every cell instead of passing as two skips. Nine of nine mutations killed ([#1128](https://github.com/MakazhanAlpamys/Soup/issues/1128), [#1134](https://github.com/MakazhanAlpamys/Soup/pull/1134))- Gave the seventeen config fields #808 found accepted and read by nothing a voice at load: a non-default value now prints `<field> is accepted but read by nothing; v0.77 will refuse it`. **The comparison uses the validated value, so `'false'`, `'off'` and `''` stay silent**, and the loader cannot fall back to the weaker raw comparison. The deadline sits in one constant, and a `TestTheDeadline` test fails if the v0.77 refusal is forgotten or done early: #627's warn-then-refuse mechanism, applied to fields instead of keys ([#808](https://github.com/MakazhanAlpamys/Soup/issues/808), [#1106](https://github.com/MakazhanAlpamys/Soup/pull/1106))- Brought the nine training-intelligence and convergence knobs that #808 had left in `soup train`'s undated "not enforced" note (`forgetting_eval_steps` / `_benchmark` / `_stop`, `checkpoint_eval_steps` / `_metric` / `_tasks` / `_keep_top`, `convergence_window`, `convergence_rel_tol`) under the dated warn-then-refuse rule of the first seventeen. Each is now reported once, with the v0.77 date, and the note keeps only what the loader does not cover. **The second review round closed every item raised, including two non-blocking tests that would have broken silently at the v0.77 switch.** 339 passed on the merged tree, and 203 shipped configs load under the error severity. All 10 mutations fail a test, including the two that survived the first round ([#808](https://github.com/MakazhanAlpamys/Soup/issues/808), [#1379](https://github.com/MakazhanAlpamys/Soup/pull/1379))+ - Took one of the seven sites of #1464 (the issue stays open): on Windows, `soup data best-of-n` offline staging unlinked its `.soup.group.*.tmp` files while the descriptors were still open, so `[WinError 32]` replaced the real error (`FileExistsError: [WinError 183]` for an `--emit-pairs` below a regular file) and the staging files were left behind. They claimed the site on the issue, reproduced it natively on Windows as the ruling asked, and made the handler close `sft_fd` and `dpo_fd` in a nested try/finally before it unlinks, so a failing `os.close` cannot skip the unlink. **The part worth copying is the unlink spy**: it asserts with `os.fstat` that the descriptor is already closed before the real `os.unlink` runs, so the tests assert the ordering directly instead of relying on Windows refusing to delete an open file. Five tests; dropping the `sft_fd` close fails 2, the `dpo_fd` close 1, the unlink all 5; 163 passed with 158 related best-of-n tests. Two gaps are left as known: nothing makes `os.close` itself raise, and the `except OSError: pass` guard on the outer `finally`'s close is not pinned ([#1464](https://github.com/MakazhanAlpamys/Soup/issues/1464), [#1753](https://github.com/MakazhanAlpamys/Soup/pull/1753))- **Nehal kanak kuniyil thottathil** ([@sloemo01](https://github.com/sloemo01))- First contribution: the single-projection step of the Fast-LoRA tracker — LoRA forward and backward for one adapted projection as a `torch.autograd.Function`, with the scaling folded into the LoRA term, everything backward needs carried by `save_for_backward` (the #331 rule) including the NF4 quant state, and NF4 weights dequantised transiently so a streamed pool slot is never aliased past the call. **The review was about proving the fast path is actually taken, and every round closed exactly what was asked**: a vacuous `lora_B`, the `fan_in_fan_out` guard (removing it makes a square Conv1D silently diverge), `lora_bias` and double backward in round one; an unconditional delegate that left the suite green in round two, now killed by two `grad_fn` arms; and three narrowings of that pin (3-D input, bias-less, both) that all survived at 24 passed and now each fail by name. On CUDA, fp32, bf16 and NF4 agree exactly with peft ([#839](https://github.com/MakazhanAlpamys/Soup/issues/839), [#1087](https://github.com/MakazhanAlpamys/Soup/pull/1087))@@ -699,6 +710,7 @@ Listed by first contribution. PR numbers link the work.- `soup expect` passed datasets it had not checked: a UTF-8 BOM hid the first row from the PII check, malformed and non-object JSONL lines were skipped or dropped silently, and an empty file passed with `Rows 0`. They read the file as `utf-8-sig` and refused unreadable lines and zero-row runs as an input error (exit 3, count plus the first ten line numbers), kept distinct from a real suite failure (exit 2), and updated the two docs sentences that described the old behaviour. In review they tightened two `in (2, 3)` asserts to `== 3` and pinned the count and the ten-line cap; 9 tests, all failing on `main`, and 12 of 12 mutations killed ([#1434](https://github.com/MakazhanAlpamys/Soup/issues/1434), [#1457](https://github.com/MakazhanAlpamys/Soup/pull/1457))- `soup compile`, quantized GGUF export and `task: unlearn` all checked their destination only after the expensive step and then discarded the result: the compile optimizer ran its LLM calls before refusing `-o ../out.py` (exit 1, no clean refusal), a quantized export into a missing directory crashed in `mkdtemp` after the adapter merge and the cleanup deleted the merged model, and unlearn trained to the end before refusing an output outside the working directory or a symlink. They moved each check in front of the work (plan-time compile check with the write-time one kept as the TOCTOU guard and its `ValueError` turned into exit 2, the export parent created before the merge, `setup()` refusing first), pinned the unlearn ordering with an import sentinel that fails when the call is removed, and in review made both export tests hermetic with the missing-parent precondition asserted after two stray `model.gguf` files had been committed and had hidden the fix from CI; 9 tests (6 fail on `main`, 3 are in-cwd controls), 4 of 4 mutations killed ([#1445](https://github.com/MakazhanAlpamys/Soup/issues/1445), [#1469](https://github.com/MakazhanAlpamys/Soup/pull/1469))- KTO reached TRL with a per-device batch of 1 by three routes, and TRL refuses that outright ("Actual (not effective) batch size must be > 1"): a resident `task: kto` config at `batch_size: 1` loaded and loaded its model before dying (the parse-time refusal covered only `stream_layers`), `batch_size: auto` floored its halved estimate at 1, and `soup local-rl train --train-method kto` hard-wrote `batch_size: 1`. They refused it at config load for every KTO config, floored `auto` at 2, and changed the local-rl default; the `auto` test runs a real `KTOTrainerWrapper.setup()` on a tiny CPU model with the estimator patched to 1, 2 and 3, and the local-rl test builds a real `KTOTrainer` from the rendered YAML. Over four review rounds they rewrote the refusal message to name the KL term and the fix (it had told resident users about "a streaming run"), put the MLX refusal back in front of the batch message, documented the rule in two pages, and removed two comments that named a release the change had not shipped in; 5 new tests fail on `main`, 9 of 10 mutations killed ([#1420](https://github.com/MakazhanAlpamys/Soup/issues/1420), [#1476](https://github.com/MakazhanAlpamys/Soup/pull/1476))+ - Ten names in the optimizer allowlist were rejected by `TrainingArguments(optim=...)` on transformers 5.x, so each passed config load and failed after the model had loaded. They checked the list against transformers 5.17 before changing anything, refused eight of the names at config load with a message that names working alternatives, and, when review showed that `muon` and `adamw_hf` are built by the MLX backend itself, kept those two working there and refused them on `transformers` and `unsloth` in a `SoupConfig` validator. Their parametrized test builds `TrainingArguments(optim=name)` for every allowlisted name, so a name transformers rejects fails the suite instead of a user's run, and in review they added the test that takes every recommended alternative through the optimizer-building step. The last commit (the retired-names test that still listed the two MLX names, and the `unsloth` case) is the maintainer's. Verified: 77 passed in the two touched test files, 2355 passed across 48 related files, a 32-name by 3-backend load matrix refuses exactly the ten, and 12 of 13 mutations are killed ([#1269](https://github.com/MakazhanAlpamys/Soup/issues/1269), [#1283](https://github.com/MakazhanAlpamys/Soup/pull/1283))- **yi111** ([@Yi-111-a](https://github.com/Yi-111-a))- First contribution: with torchao actually installed, four FP8-gate tests failed. The `converts` fixture stubbed `torchao` as a bare module that transformers' torchao quantizer could not import, and two "torchao absent" tests left real `torchao.*` submodules cached. The fixture now pre-seeds a package-shaped stub tree, the absent-torchao tests clear cached submodules, and the torchao-contract CI job runs the file against real torchao. **They fixed two failures the issue had not listed.** Those appear only when an earlier test file has already imported torchao, which is the CI job's own order. With torchao 0.18.0, `main` fails 4 of 333 in that job's command and the branch passes all 333; 5 of 7 fixture mutations fail a test ([#1205](https://github.com/MakazhanAlpamys/Soup/issues/1205), [#1284](https://github.com/MakazhanAlpamys/Soup/pull/1284))@@ -782,6 +794,7 @@ Listed by first contribution. PR numbers link the work.- **Bakdaulet** ([@bakdauletbaktygaliyev](https://github.com/bakdauletbaktygaliyev))- First contribution: `soup diagnose` scored a probe that never ran as OK 1.00, so the overall verdict, the exit code and the badge all read it as a pass: a `--dataset` of ShareGPT or plaintext rows gave overall OK / exit 0, a 9000-character prompt turned a MAJOR into OK, and a `--tokenizer` typo exited 0 with a green badge. They added a `NOT_RUN` verdict (score 0.0 only, ranked between MINOR and MAJOR, grey, exit 3 unless `--allow-not-run`, MAJOR still wins), kept the exception text in the evidence, resolved `--tokenizer` before any model loads, and found two consumers nobody asked about, `train --diagnose-gate` and the MCP `diagnose_evidence` tool, both fixed through one shared `evidence_default_score` helper. **The part worth copying is what they did with review**: a second round showed memorization still reading OK 1.00 on `question`/`answer`, `query`/`response` and `input`/`output` rows and only two of six converted `except` sites pinned by a test; they took the guard, added a parametrized test over all six probe sites and three memorization shapes, tightened both, and named the gap they left on purpose rather than hiding it. The 175 tests in the two touched files fail 39 on clean main and pass on the branch; 19 of 20 mutations of the new logic fail a test, including the four sites that survived the first round ([#1435](https://github.com/MakazhanAlpamys/Soup/issues/1435), [#1489](https://github.com/MakazhanAlpamys/Soup/pull/1489))+ - Part 2 of #1435: the live probes read their prompt/answer pairs from a fixed list of flat keys, so ShareGPT, tool-calling, multi-turn ChatML and plaintext datasets came out `NOT_RUN` and an Alpaca `input` never reached a prompt. They routed rows through `detect_format` and the training converters, keeping the old lookup as a fallback, instead of growing the key list; ran memorization without pairs; and made one bad row unable to cost a model load: over-long and NUL-byte prompts and media rows are skipped and counted in `extras.rows_skipped`, a converter that raises falls back, and the `NOT_RUN` reason names the dominant cause. Over four reviews the `--holdout` reader moved onto the same path, and each finding got a test that fails without its fix: the DPO target, the read-before-load order, the control bytes on the `--evidence` path, and the media hold-out (a LLaVA or audio hold-out is now `NOT_RUN` like an audio `--dataset`). 130 tests in the four files; 19 mutations all fail a named test ([#1435](https://github.com/MakazhanAlpamys/Soup/issues/1435), [#1526](https://github.com/MakazhanAlpamys/Soup/pull/1526))- **Ashutosh Panda** ([@Ashutosh-Panda2004](https://github.com/Ashutosh-Panda2004))- First contribution: a completed `task: ppo` run reported `Loss: unavailable` because the loss summary only read the `loss` key while trl 0.29's PPOTrainer logs its per-step policy loss as `loss/policy_avg`. The fix lets the trainer declare the key (`loss_key="loss/policy_avg"`, SFT/DPO output unchanged), records it in the result and shows it in the completion panel; after review the wiring is pinned by a behavioural test that drives `_train_builtin` on a trl-0.29-shaped `log_history`, so moving the key to the wrong call or summarising an empty history now fails. 9 new tests (6 fail on `main`), 11 of 11 mutations killed ([#1413](https://github.com/MakazhanAlpamys/Soup/issues/1413), [#1416](https://github.com/MakazhanAlpamys/Soup/pull/1416))@@ -827,6 +840,8 @@ Listed by first contribution. PR numbers link the work.- Follow-up to their own `mxfp4` pre-flight fix: the same gate still let `gptq`, `awq`, `aqlm`, `eetq`, `fp8` and `hqq:*` start without a check and without a word, and the `fp8` row of the predictor's table said 1.0 byte per parameter for a base the loader dequantizes to bf16. They took the issue after the maintainers' decision, measured `fp8` on a tiny checkpoint quantized with transformers' own `Fp8Quantize` before asking, then moved the mapping into one table so the skip line and the gate ask the same question, priced the four packed formats at the table's figures budgeted like `8bit`, corrected `fp8` to 2.0 with the dequantized-on-load sentence shared with `mxfp4`, and made `hqq:*` print one line instead of staying silent. **The part worth copying is the pin:** the `fp8` figure is tied to a real `FineGrainedFP8Config(dequantize=True)` load asserting 2.0 bytes per parameter, and each mapping entry has its own test beside a `none` control, so a removed entry or a changed figure fails by name; they also reported that `quantization: fp8` on a dense base does not load on transformers 5.16.1, the declared floor, in the PR body when their new load test hit it ([#1652](https://github.com/MakazhanAlpamys/Soup/issues/1652), [#1729](https://github.com/MakazhanAlpamys/Soup/pull/1729))- A follow-up to their own #1555: review had found one surviving mutation, because no test loaded `use_dora: true` with a GPTQ, AWQ, AQLM or EETQ base on `backend: unsloth`, so the mlx-only early return could be widened to unsloth with every test still passing. They added the unsloth refusal case and a plain-LoRA control that asserts the backend really is unsloth, over all four formats. **The part worth copying is the reply to the ordering problem**: when review showed the refusal test would fail the moment the approved #1657 landed (its backend refusal fires first and names neither the format nor `use_dora: false`), they asserted only the text both refusals share, ran the file on `main` and on `main` plus #1657, and stated in the PR that the old mutation becomes unreachable once #1657 is in. 8 new tests (25 in the file), 5 of 6 mutations killed (the sixth, an unrelated refusal that still says DoRA, is accepted by design) ([#1466](https://github.com/MakazhanAlpamys/Soup/issues/1466), [#1661](https://github.com/MakazhanAlpamys/Soup/pull/1661))- `training.rope_scaling_type` loaded on all 23 tasks and every path, but only the transformers setups of `sft`, `tts` and `pretrain` read it, so on the other 20 tasks and on `sft` with `backend: mlx`, vision or audio modality, layer streaming or `backend: unsloth` the run trained on the checkpoint's own RoPE without a word; the shipped `longcontext` template even suggested the `backend: unsloth` line that dropped it. They claimed the issue, posted the plan first (refusal only, a named `ROPE_SCALING_APPLYING_TASKS`, one validator beside the freeze one), then refused the field at load with a message that names the field, the task or each setting that leaves the reading setup in dispatch order, any `yarn_*` key set beside it, and what to change. `pretrain` with a vision or audio modality was left loading because its `setup` branches on the backend only, and two combinations another validator already refuses are listed as such. Two ratchets tie the task split and the path order to the trainer source. 204 new tests (118 of 250 fail with the validator disabled), 24 of 26 reviewer mutations killed (the two survivors are unreachable combinations), all 17 inline templates, 21 template files and 170 recipes still load ([#1697](https://github.com/MakazhanAlpamys/Soup/issues/1697), [#1730](https://github.com/MakazhanAlpamys/Soup/pull/1730))+ - Closed #1731, their own report: `training.quantization: fp8` on transformers 5.16.1, Soup's declared floor, died inside transformers (`AttributeError: 'NoneType' object has no attribute 'get'` in the FP8 quantizer's `update_tp_plan`) for any base without MegaMoE experts. They reproduced it on real 5.16.1, 5.17.0 and 5.18.0, took the ruling (refuse at loader-build time, no floor change inside a bug fix), waited for #1729 to land as agreed, then made the `fp8` branch refuse below 5.17.0 with a message naming the installed version, the required one, the upstream reason and the upgrade command, and put the same minimum into the `>= 4.45` ImportError text and the Quant Menu row. **The part worth copying is the stated limits**: the version is compared as a version (5.9.0 and 5.16.10 are older, a pre-release of 5.17.0 is refused), and the PR says it did not check which pre-release first carried the fix and has not shown that an fp8 base with MegaMoE experts fails on 5.16.1 although it now refuses it. They also moved the two FP8 load tests of #1652 onto the same constant so the two changes cannot disagree. 22 tests (12 fail on `main`), 117 passing with the #1652 file, 2237 across 38 related files, and every comparison mutation including the exact-5.17.0 boundary killed ([#1731](https://github.com/MakazhanAlpamys/Soup/issues/1731), [#1745](https://github.com/MakazhanAlpamys/Soup/pull/1745))+ - Closed #1736, their own report: with unsloth installed, `soup train` told every run on `backend: transformers` to add `backend: unsloth`, including configs the loader refuses as soon as that line is added, so 38 of the 184 shipped templates and recipes on transformers (30 `moe_lora`, 3 `asr`, the 2 that set `rope_scaling_type`, 3 more) got a tip they would be refused with. They sized the problem on the issue by loading and re-validating every shipped config, then made the tip depend on re-validating the dumped config with `backend: unsloth`, so a new backend refusal needs no list in `train.py`; only the second pass's `ValidationError` means no, the availability check comes first, and the config it is given is not changed. **The part worth copying is how the tests close the loopholes**: the second validation is checked on every shipped config for stdout, warnings, DEBUG logs and eight filesystem calls with spies that call through (a raising trap had broken pytest's own reporting), and the dry-run tests assert the run reached its last line, because a crashed run also prints no tip. They report that two of their 11 mutations survived the first version of the tests and were fixed. 47 tests fail with the helper always answering yes, and a recount over the shipped configs gives 184 on transformers, 146 keeping the tip and 38 not ([#1736](https://github.com/MakazhanAlpamys/Soup/issues/1736), [#1746](https://github.com/MakazhanAlpamys/Soup/pull/1746))- **Nariman Abdikarim** ([@Nari-Ab](https://github.com/Nari-Ab))- First contribution: `soup data generate --template preference` appended every preference row before the dedup check, so rows repeating a `--dedup-with` file and repeats within the same run were all written. They claimed that one item of the #1448 audit, routed preference rows through the shared dedup check, and built an order-independent key from the DPO and KTO fields. **Review found that nothing pinned which fields make up the key: a prompt-only key passed every test and would have dropped every later row for the same prompt. They added the proposed test and the exact duplicate count within minutes.** The new file is 4 failed on `main`, 11 of 11 mutations are caught, and 507 related tests pass ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1605](https://github.com/MakazhanAlpamys/Soup/pull/1605))@@ -834,6 +849,8 @@ Listed by first contribution. PR numbers link the work.- Fourth merge: a bad `SOUP_LAYER_STREAM_STRIPE_DIRS` entry was refused only when the layer-stream setup ran, after the dataset had loaded and a run row existed, and `soup train --dry-run` and `soup doctor` never checked the variable. They split the checks that need no disk probe into one helper shared by the setup path and doctor, so the setup stays the authority and the NVMe probe stays where it was; `soup train` and `--dry-run` now refuse before the prompt and the dataset load, and `soup doctor` lists each entry, sanitised, records an advisory issue for a refused one and applies the NVMe rule under `--disk`. Every gap four review rounds found became a test: 20 pass, the file cannot import on `main`, and 15 of 15 mutations of the new code fail one ([#1613](https://github.com/MakazhanAlpamys/Soup/issues/1613), [#1628](https://github.com/MakazhanAlpamys/Soup/pull/1628))- Vision SFT crashed after the model loaded on a Hub `datasets.Image()` column (decoded PIL images) and on parquet image structs (`{"bytes", "path"}`), because the trainer treated every image value as a file path. They taught the trainer to convert decoded images and decode embedded bytes, and moved a path-only struct into the loader's existing path checks, so it gets the same refusals, media-directory resolution and `is_under` containment as a string path. **The part worth copying is that every guard branch got its own test**: over four review rounds each surviving mutation became a test, including one proving a struct whose bytes fail to decode never falls back to its unchecked path. 10 of 11 new tests fail on `main`; on the final head 8 of 8 mutations fail a test ([#1597](https://github.com/MakazhanAlpamys/Soup/issues/1597), [#1601](https://github.com/MakazhanAlpamys/Soup/pull/1601))- `validate_stripe_root` refused a file given as a stripe entry, but no test named a file as an entry, so changing `isdir` to `exists` left the whole stripe suite green. They claimed #1674 with the file and the behaviour named, then added the one test that passes an existing file and asserts `StripeRootError` matching "existing directory"; the `isdir` -> `exists` mutation fails only that test (1 failed, 154 passed) and survives without it (154 passed, 6 skipped) ([#1674](https://github.com/MakazhanAlpamys/Soup/issues/1674), [#1676](https://github.com/MakazhanAlpamys/Soup/pull/1676))+ - First contribution: `soup merge --save-format 4bit_forced` passed `bnb_4bit_skip_modules=[]`, which `BitsAndBytesConfig` does not accept, so transformers kept skipping `lm_head` and the forced format wrote the same checkpoint as plain `4bit`. They pass `llm_int8_skip_modules=[]` instead and drop the dead kwarg. Models with tied embeddings, whose 4-bit `lm_head` would break on the first forward pass, are now refused by name before the 4-bit reload and before any output is written. Plain `4bit` still merges them. 270 passed, 12 skipped; 4 new or edited tests fail on `main`; 5 of 6 mutations fail a test ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1606](https://github.com/MakazhanAlpamys/Soup/pull/1606))+ - The striped layer-streaming disk pre-flight split the shard estimate evenly across the roots, so the primary drive, which also holds the embedding, head and extras, was under-charged. They charged each root the bytes it will receive, read from the source safetensors headers with no tensor loads, put the non-decoder bytes on root 0 at the streaming dtype, and kept the even split, marked approximate, for an unreadable header and for `qwen4_exp`. **Over three review rounds they turned a red end-to-end test green, excluded tables the sharder never writes, and added the tests for every mutation that survived**; twelve mutations now each fail a named test, and on disk the charged shares are 1.003x the bytes that land ([#1612](https://github.com/MakazhanAlpamys/Soup/issues/1612), [#1726](https://github.com/MakazhanAlpamys/Soup/pull/1726))- **John Coplin** ([@johncoplin](https://github.com/johncoplin))- First contribution: the friendly-error formatter's `HTTP 401`/`HTTP 403` text patterns let two whitespace groups compete for the same run, so an exception message with `HTTP` followed by a long whitespace run and no status took about 13 s to print at 50,000 spaces. Since #1366, that check runs for every exception in the chain. They claimed the issue, rewrote both patterns so the optional whitespace is consumed only after a `:`/`=` separator, and added a timing test that fails on `main`. **The part worth copying is the equivalence test**: all 15 phrasings from the issue run against the old and the new pattern for both 401 and 403, so the speed-up provably changes nothing about what gets classified. 31 tests (1 fails on main), 7 of 7 mutations killed ([#1367](https://github.com/MakazhanAlpamys/Soup/issues/1367), [#1594](https://github.com/MakazhanAlpamys/Soup/pull/1594))@@ -847,10 +864,14 @@ Listed by first contribution. PR numbers link the work.- **Geovana G. Grigorio** ([@geoggrigori](https://github.com/geoggrigori))- First contribution: the docs claimed an 8B base fits a 4 GB card with 4-bit layer streaming without saying at what shape, while `data.max_length` defaults to 2048. They put the measured shape next to the claim (batch 1, 512 tokens per step, about 1 GB per further 512 tokens on a 128k-vocabulary model) and added the Llama-3.1-8B NF4 figure from probe v0.73.0 section 9 to "Sizing a streaming run", with the note that the default `max_length` must come down to 512 for that setup. Docs only; every number and anchor re-checked against the probe record and the schema ([#1695](https://github.com/MakazhanAlpamys/Soup/issues/1695), [#1719](https://github.com/MakazhanAlpamys/Soup/pull/1719))+ - Closed #1741, which asked for tests for two guards in `BufferedCanaryOutcomes` that could be removed with every test still green: the accept-time `_is_current` check in `record` and the pre-record flush that refuses outcomes during a persistence outage. They claimed it on the thread before opening the PR, ran the mutation check from the acceptance criteria themselves, and opened the PR with the two tests as the issue spells them. **The part worth copying is the table in the PR body**: 32 passed with the tests, and each removed guard fails exactly one named test (1 failed, 31 passed), so the reviewer could repeat it; on the review head each mutation again failed only its own test (the `not os.path.exists(buffer.path)` assertion and `assert 7 == 2` on `stable_ok`). The PR also says there is no source change because both guards are live and no fragment because it is tests only. Two optional follow-ups remain: a `match=` on the `OSError` assertions and a `record()` after recovery ([#1741](https://github.com/MakazhanAlpamys/Soup/issues/1741), [#1754](https://github.com/MakazhanAlpamys/Soup/pull/1754))- **Hitesh_G** ([@Hitesh-XS](https://github.com/Hitesh-XS))- First contribution: `soup diagnose` read an answer in Lao, Khmer, Myanmar, halfwidth katakana or a CJK Extension C+ block as a single token and scored a symbol-only answer against a hard-coded placeholder, so the memorization and mode-collapse probes were blind in those scripts. They widened the no-space ranges so these scripts are scored per character pair like Thai, made symbol-only answers compare by their symbol and punctuation characters, and kept rows or answer sets with no tokens out of the scores instead of letting them dilute the mean. **Across three review rounds they closed every point, the last one (a mark such as U+FE0F dropped from the symbol fallback) in a single push with the tests verbatim**; five mutations each fail a named test, 25 tests on the PR and 2,997 around it pass ([#1343](https://github.com/MakazhanAlpamys/Soup/issues/1343), [#1559](https://github.com/MakazhanAlpamys/Soup/pull/1559))+- **Sajjad Ghasemi** ([@sajjadlabx](https://github.com/sajjadlabx))+ - First contribution: a committed Git conflict marker turned no check red, because CI never runs pre-commit and `docs/` is outside ruff's paths, and one had shipped in a docs file. They added a test that scans every tracked text file for `<<<<<<<`, `|||||||`, `=======` and `>>>>>>>` at column 0 and names the file and the line, with an `=======` rule that stays quiet on Markdown and reStructuredText underlines, and handled CRLF, binary files and a checkout without git. Over five review rounds every point was closed by a test that fails when the behaviour is removed; the `|||||||` check was first shown by @Guts1005 in #1135 ([#1125](https://github.com/MakazhanAlpamys/Soup/issues/1125), [#1130](https://github.com/MakazhanAlpamys/Soup/pull/1130))+---Want to join this list? See [CONTRIBUTING.md](CONTRIBUTING.md) — good first issues are