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): #1750, #1821, #1828, #1845, #1708, #1836, #1873, #1840, #1732, #1847, #1842 [skip ci]
Alpamyseccea04a291a
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 222517a4..6e70a437 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -225,6 +225,10 @@ Listed by first contribution. PR numbers link the work.- 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))- Closed #1412, reported by @maximilianfeix, which asked that a non-default `training.moe_aux_loss_coeff` is not accepted where nothing applies it: `backend: unsloth` (sft, pretrain) and `training.stream_layers: true`. They made `_validate_moe_flags_reach_a_trainer` refuse it at config load on both, next to the #1394 check, with a message that names the way out, the default 0.01 still loading and `backend: transformers` keeping a non-default value, and put the two cases into the `moe_aux_loss_coeff` row of the docs. **The part worth copying is the default-only carve-out in the tests**: the non-default value is refused, the default written or omitted still loads on both paths, and `backend: transformers` keeps 0.05, so the refusal cannot grow into a blanket ban. They took the review's requests (the credit form `(#1412 by @kok-o in #1749)`, a repaired PR description, the default read once) and the PR acknowledged the claim history on the issue and offered to defer. 11 new tests; 121 related tests pass, and 562 with the existing `moe_aux_loss_coeff` files; dropping the unsloth check fails 2 of the new tests; `moe_aux_loss_coeff: 0` and a `tts` case are not pinned ([#1412](https://github.com/MakazhanAlpamys/Soup/issues/1412), [#1749](https://github.com/MakazhanAlpamys/Soup/pull/1749))+ - Took the one-line fix proposed on #1354 (the issue stays open for its GPU measurement): `StreamPrefetcher.prime()` copied decoder layer 0 into the buffer pool at the start of every forward pass even when the preceding backward pass had left it resident, so the decoder loads over three steps on the tiny fixture were 4, 3, 3 and are now 4, 2, 2. They wrote `Refs #1354` because the stall measurement on a GPU was not theirs to take, and reworked the tests over four heads: the load and gradient tests wrap the real `prime()` with an owner-reset hook instead of copying its body, and the disk-tier test's hit-count floors, which pass with the fix reverted, became exact get counts (72, as 36 / 18 / 18) with per-step miss bounds. **The part worth copying is the paired measurement**: the same disk-tier scenario with and without the reload, 18 against 27 gets per step and the same steady-state misses, instead of a hit-rate floor that cannot tell the two apart. Making `prime()` load unconditionally fails 3 tests and never loading fails all 11; 560 passed with the neighbouring layer-streaming files ([#1354](https://github.com/MakazhanAlpamys/Soup/issues/1354), [#1750](https://github.com/MakazhanAlpamys/Soup/pull/1750))+ - Closed #1801: the comment above the hub-cache `model_copy(update={"base": ...})` call in `commands/train.py` claimed Pydantic reruns the `base` validators, which `model_copy` never does. They rewrote it to say what the call does and why no revalidation is needed (`local_path` is the `is_under_cwd`-checked cache directory). Comment-only, AST identical before and after ([#1801](https://github.com/MakazhanAlpamys/Soup/issues/1801), [#1845](https://github.com/MakazhanAlpamys/Soup/pull/1845))+ - Closed #1800, which asked that the Linux disk kind describe the volume holding the cache. They made the probe resolve the device through sysfs, follow partitions and stacked-volume members (slowest kind wins) with a depth cap and an "unknown" fallback, and after review fixed a Windows-only fixture path and pinned all five guard branches. 20 new tests; five mutations (depth cap, isdir guard, member order, rotational default, ValueError except) each fail 1-2 of them ([#1800](https://github.com/MakazhanAlpamys/Soup/issues/1800), [#1847](https://github.com/MakazhanAlpamys/Soup/pull/1847))+ - Closed #1405, which asked that unlearning code stop promising features for an already-shipped release. They removed the expired promises from the helpers and the eval command, made the MLX refusal name the supported backend, and widened the schema-only guard to every raise message under src/soup_cli, then, after review, pinned that the helper file is scanned and covered the eval docstring. 10 tests pass; two mutations (narrowed scan root, re-added promise) each fail one ([#1405](https://github.com/MakazhanAlpamys/Soup/issues/1405), [#1842](https://github.com/MakazhanAlpamys/Soup/pull/1842))- **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))@@ -384,6 +388,7 @@ Listed by first contribution. PR numbers link the work.- Added four validated DeepSeek-R1-Distill recipe entries with synchronized catalog counts, documentation, and Hub-backed model metadata tests ([#569](https://github.com/MakazhanAlpamys/Soup/pull/569)).- Took `soup local-rl train --backend` from #1448: validated, then read by nothing, so the rendered nightly job was byte-identical for `--backend ollama` and `--backend mlx`. A first version rendered the value into the unit files; when review showed that the training step has no `ollama` backend to select, they reworked it to the honest half in one commit on top of the PPO fix it had collided with: the option is validated, not rendered, and prints one note that it has no effect on training — and then closed the last point (the note fired on every call, including the nightly `--once` run that never passes the flag) with a default of `None` and a test for that path. 18 tests in the file, 564 passed / 14 skipped with eleven neighbouring files on a trial merge with `main`; seven mutations (note deleted, unconditional, inverted, `--backend` rendered, default changed, allow-list disabled, value dropped before validation) each fail a named test ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1678](https://github.com/MakazhanAlpamys/Soup/pull/1678))- `soup export --registry-id` and `--deploy` did something only on the plain GGUF branch, so eight export formats finished "successfully" with nothing recorded in the registry and nothing deployed. They claimed that one row of the #1448 audit with a plan first, refused `--deploy` up front for the five formats Ollama cannot load, forwarded it for the three that produce a GGUF, and wired the registry attach into every format. After review they dropped an unrelated commit, made a TensorRT export record its engine files, recorded every shard and data file with the names in the success line, and added a test that stubs only the third-party converters, which pinned the seven helper returns that the first set of tests had replaced. 32 tests fail on `main`; 26 of 28 mutations are caught, including all seven return mutations ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1679](https://github.com/MakazhanAlpamys/Soup/pull/1679))+ - The CUDA out-of-memory and `OutOfMemoryError` hints in `utils/errors.py` never named `data.max_length`, the lever left at batch size 1 on a large-vocabulary model, where logits and loss scale with sequence length. They added "lower data.max_length" to both entries and pinned the text with tests that check the message each error path prints as well as the ERROR_MAP entries themselves ([#1694](https://github.com/MakazhanAlpamys/Soup/issues/1694), [#1708](https://github.com/MakazhanAlpamys/Soup/pull/1708))- **Tal** ([@taljeon](https://github.com/taljeon))- First contribution, and it closed a gap in a guard that was **one day old**: the `dtype=` scanner from #489 matched only class names starting with `AutoModel`, so the same load-breaking kwarg on a CONCRETE class — `WhisperForConditionalGeneration.from_pretrained` in the ASR training path — was invisible to it. They took the **suffix rule** rather than a name allowlist, which is the harder and correct choice: an allowlist silently stops covering a class added later. Verified with a negative control rather than by inspection — `dtype="auto"` on the real Whisper site fails by name on their branch and **survives on `main`**, so the gap was real. Two things I check on every widening they got right unprompted: the existing `AutoModel*` coverage was not traded away for the new coverage, and the scanner still ignores `FastLanguageModel`, `PeftModel`, `torch.zeros` and wrapper kwargs — a guard that fires on correct code is one people delete. All six deleted lines are renames or a reworded message; the file goes 11 tests to 12 ([#497](https://github.com/MakazhanAlpamys/Soup/pull/497))@@ -403,6 +408,7 @@ Listed by first contribution. PR numbers link the work.- `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))+ - Closed #1798, their own report: `soup eval gate` printed `GATE PASSED` and exited 0 for a suite with no tasks (`tasks: []`, a missing `tasks` key, or a `task:` typo holding the intended evaluation), because the list defaulted to empty, unknown keys were ignored and `run_gate` returned a pass after zero iterations. They asked for the contract of an explicit `tasks: []` before touching it, then added one shared check called from both `load_suite` and `run_gate`, so `soup eval gate` exits 3 before a model is built and a direct `run_gate` caller or a suite emptied after loading is refused with a message naming the suite and `tasks`. **The part worth copying is the test that empties a loaded suite**: `load_suite` accepted it, so only the `run_gate` guard can stop it, the case a loader-only fix would miss (removing the `load_suite` guard fails 9 tests, the `run_gate` guard 4), and a factory spy shows the CLI never builds a model. Non-empty PASS, FAIL and regression controls run through both the API and the CLI, the old #404 test was rewritten to keep its intent instead of leaning on an empty suite, and the PR says what it did not run (full suite, mypy, a live model). 24 new tests, 13 of which fail on the previous `gate.py` ([#1798](https://github.com/MakazhanAlpamys/Soup/issues/1798), [#1821](https://github.com/MakazhanAlpamys/Soup/pull/1821))- **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))@@ -589,6 +595,7 @@ Listed by first contribution. PR numbers link the work.- `soup migrate --from unsloth` let the last config call decide the migrated task, output and hyperparameters, so an SFT warm-up written after the stage config (or a config no trainer received) silently overwrote the stage's learning rate, batch size, output and task. The migrator now reads the config the last trainer actually receives (`args=` or the first positional config after the model, inline or by name); the review caught that DPO's reference model and GRPO's reward functions sit before `args`, and the follow-up added tests that fail when each rule is removed. A visible consequence is stated in the changelog: four public Qwen3 4B GRPO notebooks no longer inherit the warm-up's `training.epochs: 2` ([#1603](https://github.com/MakazhanAlpamys/Soup/issues/1603), [#1711](https://github.com/MakazhanAlpamys/Soup/pull/1711))- Serving a canary no longer parses `loop.yaml` and rewrites `canary-stats.json` on every keyed request: the policy is cached on the file's `(st_mtime_ns, st_size, st_ino)` identity, so a rollback written by `soup loop watch` still reaches the next request, and outcomes are persisted in batches of 64 or after two seconds, with the tail flushed at shutdown and rollout ids checked on accept and on write. **The cost is stated rather than hidden:** the verdict `watch` reads now trails the traffic by that window, a crash loses it, and during a disk outage outcomes past the pending batch are refused, all in the docs and the changelog. A keyed request with a 50% canary went from 3.45 to 2.18 ms. The review round added four tests for documented bounds that no mutation had caught, each now killed by a named test ([#1320](https://github.com/MakazhanAlpamys/Soup/issues/1320), [#1712](https://github.com/MakazhanAlpamys/Soup/pull/1712))- Closed #1330 (the follow-up to @Yi-111-a's #1336; they claimed it on the issue): `soup doctor --config` still reported by spelling for the one registered field whose schema default is `true`, `data.train_on_responses_only` on vision and audio, so a config and its full YAML dump got different reports. A written default now counts as unwritten, read from the pydantic model with `get_default(call_default_factory=True)` rather than copied into a table, and `training.seed: 0` is still reported. Per the ruling they dropped the two vision/audio rows and the six `REJECTED` rows the loader makes unreachable (three MLX, three unsloth), turned the two strict xfails into passing tests, and rewrote the docs. **The part worth copying is the regression for a rule no row exercises any more**: with those rows gone, no real registry entry reaches the default comparison, so `test_written_true_schema_default_counts_as_unwritten` registers a true-default entry by monkeypatch and asserts the minimal and the explicit spelling report the same; it is the one test that fails when the comparison is removed. Putting a dropped vision row back fails 2 tests, an MLX `REJECTED` row 3, dropping seed 0 fails 1; 593 passed with the related doctor and registry files. One mutant survives and is equivalent today: `FieldInfo.default` instead of `get_default(call_default_factory=True)`, since no registry entry names a field with a default factory ([#1330](https://github.com/MakazhanAlpamys/Soup/issues/1330), [#1791](https://github.com/MakazhanAlpamys/Soup/pull/1791))+ - A dataset file with a non-object JSON row (`"abc"`, `[1, 2]`, `42`, `null`) crashed `soup data inspect`, `validate`, `stats`, `dedup` and `review` with `AttributeError`, and the training loader dropped it with a cryptic "string indices must be integers". They made the loader warn with the physical line (or array row) and skip, without printing the row, had `data validate` list the skipped rows (capped at three plus "... and N more") and gave `data review` its own object check, then, after review, kept `soup data canary insert`'s #1216 first-row refusal with a `skip_non_object=False` opt-out; 101 new tests, 32 mutations all killed, 77 of the 101 fail on `main` ([#1860](https://github.com/MakazhanAlpamys/Soup/issues/1860), [#1873](https://github.com/MakazhanAlpamys/Soup/pull/1873))- **Zhengzhuo Wang** ([@wangzhengzhuo05](https://github.com/wangzhengzhuo05))- `soup doctor` treated the seven `[train]` packages as required core dependencies, so a supported core-only install reported seven failures **and exited 0** — wrong in both directions at once, alarming about a correct install while staying silent about a broken one. The training stack is now a single optional group, a missing or incompatible core dependency exits 1 while optional packages and the train group never change the exit code, and the "Fix all" suggestion is two commands rather than one, because `--index-url` *replaces* PyPI and the PyTorch index hosts no soup-cli, trl, peft or transformers. **They also fixed the adjacent drift they found**: `soup version --full` derived extras from a hand-kept list, and now reads distribution metadata, so `scikit-learn` and `pillow` resolve and train and mcp appear on a `[dev]` install. Three rounds of maintainer mutations, every one killed — bare per-package floors, a missing core dependency exiting 0, collapsing the two commands into one `--index-url`, an unescaped fix-all payload, and reverting extras detection to `find_spec`. Both suggested commands were checked to resolve under `pip install --dry-run`. A first contribution ([#828](https://github.com/MakazhanAlpamys/Soup/issues/828), [#854](https://github.com/MakazhanAlpamys/Soup/pull/854))@@ -789,6 +796,7 @@ Listed by first contribution. PR numbers link the work.- Fifth merge. `info_rm` scored reward-model health with a cluster-separation index over a median split of the step's rewards, and on a two-valued reward such as `reward_fn: accuracy`'s 0/1 one half of that split is always constant, so the pooled variance fell to the `1e-9` floor and the index measured the success rate: a first step at exactly 50% recorded a baseline near 31,623, every healthier step after it read as a collapse, and a run halted or had its beta raised on a phantom signal. They made a step with a constant half cast no vote (no baseline, `halt_on_hack` and `kl_control` untouched, one warning per run) and tied the variance floor to the observed reward range. The review found the guard also silenced a genuine total collapse on a continuous reward; they took the narrow fix (a fully constant step votes once a baseline exists), restored the constant collapse fixtures, and caught a surviving mutation of their own by adding the test that pins it. 293 tests on the four files, nine mutations all caught, 11 of the 14 new tests fail on main ([#1438](https://github.com/MakazhanAlpamys/Soup/issues/1438), [#1630](https://github.com/MakazhanAlpamys/Soup/pull/1630))- Sixth merge, and the first translation: a Simplified Chinese README. A fifth language is a standing commitment, since every later edit to `README.md` has to be followed by a re-translation and a new stamp, and they signed up for it in the thread before starting, then held the PR until #1630 had merged so the queue stayed at one open PR. `README.zh.md` mirrors `README.md` section for section (19 sections, 12 code blocks, 20 table rows), translating prose and `#` code comments only; code, URLs, link targets, numbers and inline code are identical, which the translation ratchet and a separate mechanical comparison both confirm. The banner edit landed in all five READMEs in the same PR, and the stamps were recomputed after merging a `main` that had changed `README.md` (#1307) under them. They are named in `MAINTAINERS`, so the re-sync is theirs from now on. (#1632, #1733)- Took #1444: with `gradient_accumulation_steps` above 1, `task: prm` and `task: sft` with `data.format: raft` logged `loss`, `train_loss` and `grad_norm` G times too large (4.000x at the default G=4) and clipped a gradient G times too large, because both trainers return their own per-micro-batch mean while transformers still treated the model as one that accepts loss kwargs and skipped its `1 / gradient_accumulation_steps` division. They posted the plan on the issue first (`num_items_in_batch` is a label count, so it cannot express RAFT's `loss_weights` total), then set `model_accepts_loss_kwargs = False` in both trainers. **The part worth copying is the real-wrapper comparison**: PRM and RAFT run through their actual wrappers at `batch_size: 1` with four identical rows, once at G=1 and once at G=4, and the first logged `loss` and `grad_norm` must agree, beside a class-level ratio probe and a citation-boosted RAFT case; the fixture hides MPS from `transformers.training_args`, which caches accelerator availability. Five tests; flipping the flag back fails 2 PRM tests or 3 RAFT tests, and the neighbouring PRM and RAFT test files give 531 passed. The optional guard over all `compute_loss` overrides is not included ([#1444](https://github.com/MakazhanAlpamys/Soup/issues/1444), [#1771](https://github.com/MakazhanAlpamys/Soup/pull/1771))+ - A polish of their own translation. `README.zh.md` rendered the pre-repair and post-#331 measurement sets of the 8B figure as "一行" / "两行" (a calque of "row", which reads as lines of text) and the clock-adjusted comparison as "按单位时钟频率算". They changed five lines in three places (the figure paragraph, the figure's alt text, the Citing Soup bullet) to "那组数据" / "两组数据" / "折算", leaving every number, link target, code span and tag identical, and no re-stamp is needed because `README.md` is untouched. Prose only; review compared tokens per hunk and the per-section sets of the translation ratchet (all identical), no tests to mutate. ([#1699](https://github.com/MakazhanAlpamys/Soup/pull/1699), [#1836](https://github.com/MakazhanAlpamys/Soup/pull/1836))- **Maxi** ([@maximilianfeix](https://github.com/maximilianfeix))- AutoDistill's vocabulary guards and the weight shards' `retain_bytes=False` were pinned by no test. Disabling both guards and turning full-RAM hashing back on left all 41 autodistill tests passing. Tests now cover the capture guard for both bounds, the worker's own guard before the teacher loads (on a dataset that still matches its fingerprint), and a shard hash that retains no bytes. **They noticed the `-1` cases still passed with the capture guard off, because `CaptureToken` raises the same phrase, and said so in the PR instead of shipping them as coverage. Anchoring the matches on the full message closed the gap on the next push.** Every mutation fails the new tests: whole guard 4, lower bound 2, context and prompt bypasses 2 each, worker guard 1, teacher loaded first 4, each retention mutation 1 ([#1341](https://github.com/MakazhanAlpamys/Soup/issues/1341), [#1400](https://github.com/MakazhanAlpamys/Soup/pull/1400))@@ -857,6 +865,7 @@ Listed by first contribution. PR numbers link the work.- 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))- Took the `dpo` / `ipo` half of #1425 (the issue stays open): a `preference_loss_weights` blend naming either loss stopped at step 0, because both build trl's `DPOTrainer`, which computes its log-probs inline and keeps only their means. They measured trl's own losses on the issue's tiny Llama first (5.8290 for `ipo` against 6.8886 from the summed kernel), then wrapped the trainer's `compute_loss` so the policy sums come from its own forward pass and the reference sums from `compute_ref_log_probs`, and made the blend's `ipo` term divide by response length as trl does. **The part worth copying is the test design**: every term is rebuilt in the test from a separate forward pass with a plain `log_softmax`, so no test reads the capture to check the capture, and the blend's `ipo` term is compared with trl's own IPO loss. They reported 38 mutations of the first version, three of which survived and each got a test, and after review added the missing `_truncate_inputs` probe with a test per method name, so a trl that renames one gets the refusal instead of an `AttributeError`. 60 tests; 212 passed with the neighbouring preference files on the final head, and 19 mutations rerun on that head each fail a named test. Item 3 follows as its own PR ([#1425](https://github.com/MakazhanAlpamys/Soup/issues/1425), [#1785](https://github.com/MakazhanAlpamys/Soup/pull/1785))- Closed #1768, reported by @bobbonauta: a resumed `dpo`, `ipo` or `grpo` run restored the optimizer and the step counter but trained a freshly initialised adapter, because TRL adds a frozen `ref` adapter beside the trained `default` one and `Trainer._load_from_checkpoint`, finding an adapter subfolder (`ref/`), never reads the adapter at the checkpoint root. They claimed the issue with a CPU reproduction on a tiny Llama, measured every task that hands a `PeftModel` to TRL (dpo, ipo, `preference` with either loss and grpo are affected; `grpo_beta: 0`, orpo, simpo, bco, kto, sft and reward_model are not), and added `reload_root_adapter_on_resume`, installed in the three wrappers before the dtype restore of #1660. **The part worth copying is the premise test**: one test runs PEFT and the real `Trainer._load_from_checkpoint` without TRL and asserts that the Trainer alone leaves `default` new, with a failure message that says to remove the helper when transformers starts reading the root itself. They report 27 mutations that all fail a test, two surviving conditions removed from the code, and what they could not run (any GPU, `online_dpo`, unsloth, `stream_layers`). A review round on `718e5aed` got 11 of 11 mutations failing a named test and 176 passed with 1 skipped over the four related files ([#1768](https://github.com/MakazhanAlpamys/Soup/issues/1768), [#1797](https://github.com/MakazhanAlpamys/Soup/pull/1797))+ - Closed #1425 with its last half: a `preference_loss_weights` blend with a `simpo` or `orpo` primary and a `dpo` or `ipo` term stopped at the first step, because trl's CPO and ORPO trainers run no frozen reference. They made the blend build the reference from the trainer's own forward with the LoRA adapter switched off (no private trl toggle, PEFT's `requires_grad` flags saved and restored even when the forward raises, no extra forward for a blend without `dpo` or `ipo`). **The part worth copying is what they did when review showed the reference could be wrong**: with `pissa`, `olora`, `loftq`, `use_olora` or `relora_steps` the adapter-off model is not the starting model (policy minus reference was 0.08 at step 0 instead of 0), so the term would have trained against another model without an error; they measured it, refused that combination before the model loads with the reason and the way out, and after a second review pinned that the guard follows the largest weight and not the first key of the blend, in the guard and in the trainer build. The PR says plainly that `loftq` was not measured ([#1425](https://github.com/MakazhanAlpamys/Soup/issues/1425), [#1828](https://github.com/MakazhanAlpamys/Soup/pull/1828))- **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))@@ -868,6 +877,7 @@ Listed by first contribution. PR numbers link the work.- 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))- Closed #1762: `utils.demo_bundles.copy_bundle_to` refused any `output_path` outside the process working directory, so an app with its own workspace (Soup Zero) had to call the private `_bundle_source_path` and lost the per-line JSON check, the size cap and the staged write. They took option 1 of the issue, a keyword-only `root` that defaults to the working directory, and reused the shared `is_under` helper (realpath + commonpath) for it. **The part worth copying is what they did when the review replaced `is_under` with a lexical `startswith` and all 41 tests still passed**: they added three boundary tests (a `..` traversal, a sibling directory `root2` next to `root`, and a directory symlink inside `root` that leads outside, asserting the target file was not created) and documented that `root=""` is refused while `root=Path("")` means the working directory, with a test. Ten mutants of the function each fail named tests and none survive; 146 passed across the touched and related files ([#1762](https://github.com/MakazhanAlpamys/Soup/issues/1762), [#1767](https://github.com/MakazhanAlpamys/Soup/pull/1767))- Closed #1596: square-bracket text in a model reply, a prompt file or a dataset key was read as Rich markup, so `arr[i]` lost its `[i]` and a closing-tag shape such as `[/INST]` or `[/b]` ended `soup chat`, `soup diff -o`, `soup eval human -o`, `soup data inspect` and `soup data validate` with exit 1, losing the results or judgments typed so far. They routed every such value through `for_terminal` (not plain `escape()`, so ESC and other control bytes are stripped too) at the chat reply and `/system` echo, the diff prompt line, panels, titles and summary headers, the eval human panels, and the data Columns, error and issue lines, and kept the `[dim]<empty>[/]` placeholder as markup. **The part worth copying is how the written output is pinned**: the tests read the `diff -o` JSONL and the `eval human -o` file back and compare the original strings (with `[/INST]`, `arr[i]`, backslashes and an ESC byte), so escaping or stripping the output fails them, and one ESC-bearing input goes through every site with `chr(27) not in out` asserted per command. In the review run, 83 tests passed with the neighbouring chat, diff, hygiene and fragment tests, and 39 of 45 mutations failed a named test; the six survivors are four equivalents and the untested empty-reply placeholder ([#1596](https://github.com/MakazhanAlpamys/Soup/issues/1596), [#1602](https://github.com/MakazhanAlpamys/Soup/pull/1602))+ - Closed #1792: seven CLI help strings held literal bracketed text (`[deprecated]`, `[doc-id]`, `[doc-N]`, `soup-cli[sigstore]`, `[data-pro]`) that Rich read as a style tag and dropped, so `--api-key` no longer said it was deprecated and the `--citation-style` help showed `()` instead of `([doc-id])`. They escaped all seven, including the two inside command docstrings, and added a ratchet that walks the live Click tree (2578 help strings, Click and Typer declarations) and fails on any bracketed tag Rich would drop. Review checked it: 19 passed on the merged tree and 8 failed on clean main; un-escaping each of the seven strings was caught by two tests (7 of 7); the rendered text of all 1419 command and option help strings changed in exactly those seven places ([#1792](https://github.com/MakazhanAlpamys/Soup/issues/1792), [#1840](https://github.com/MakazhanAlpamys/Soup/pull/1840))- **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))@@ -895,6 +905,9 @@ Listed by first contribution. PR numbers link the work.- **Emre K.** ([@kocaemre](https://github.com/kocaemre))- First contribution: closed #1812, where `soup data inspect` and `soup data review` passed dataset text through `rich.markup.escape`, which leaves ESC and the other control bytes in, so a dataset value could reach the terminal as a live OSC title escape. The sample-table headers and cells, the path lines, the vision `Image formats` row and the three review fields now go through `for_terminal`. **The part worth copying is how they fixed the tests after review**: the path and vision cases no longer need a control byte in a filename, so they run on Windows; the ESC assertion strips Rich's own colour codes first, so it holds under `FORCE_COLOR=1`; and a header regression plus an AST guard on the four sinks mean putting `escape` back fails a named test. They also kept the stats `Columns` row out of the diff because #1602 owns it, and said that the full suite could not run in their environment. In a review run, 11 of 13 mutations fail a test; the other 2 are on the `Inspecting` line, which the Windows leg cannot pin ([#1812](https://github.com/MakazhanAlpamys/Soup/issues/1812), [#1822](https://github.com/MakazhanAlpamys/Soup/pull/1822))+- **Batyrkhan** ([@Batyrkhantzy111](https://github.com/Batyrkhantzy111))+ - First contribution. `soup serve --backend sglang` on a LoRA adapter answered from the **base model** while `/v1/models` and every response reported the adapter's name: the adapter was registered at startup, but SGLang applies one only to a request whose `lora_path` names it, and neither generation route sent it. The fix threads one explicit name from `create_sglang_runtime` through `_serve_sglang` and `create_sglang_app` to both routes, streaming or not, and a full model still sends none. **The evidence is what stands out**: the tests drive `_serve_sglang` end to end against a recording stand-in for the engine and each case asserts which route the request took, so the token-ids cases cannot silently fall back to the string route; they fail on `main` (5 of 9) and pass after; every claim about SGLang's behaviour is cited to a file and line in the PyPI wheel of the version named, and the author corrected their own earlier comment in the thread (0.3.3 only for the list form of `lora_paths`) before it could mislead; and the dependency floor was raised in a commit of its own with the reason spelled out — from 0.3.1 through 0.5.0rc0 SGLang refuses to start an engine with an adapter unless the radix cache is off ([#1724](https://github.com/MakazhanAlpamys/Soup/issues/1724), [#1732](https://github.com/MakazhanAlpamys/Soup/pull/1732))+---Want to join this list? See [CONTRIBUTING.md](CONTRIBUTING.md) — good first issues are