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): #1577, #1635 [skip ci]
Alpamys74aed4c9184c
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 00b86e38..958b5cea 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -28,6 +28,7 @@ Listed by first contribution. PR numbers link the work.- Ready-made `qwen2.5-coder-7b-sft` recipe ([#285](https://github.com/MakazhanAlpamys/Soup/pull/285))- `soup data split --stratify-semantic` — a random split can leave a whole topic out of the validation set, so a regression in it is invisible; rows are now clustered by meaning and each cluster split proportionally ([#388](https://github.com/MakazhanAlpamys/Soup/pull/388))- `soup data clean` — dataset repair in place of a hand-written script: control bytes stripped, whitespace normalised, empty and duplicate rows dropped, and a report of what changed. **The reason it merged without a fight is that the design was settled on [#766](https://github.com/MakazhanAlpamys/Soup/issues/766) before a line was written**, so review never turned into a redesign. Three decisions worth naming: it is **non-destructive by default** and needs `--force` to overwrite, because a cleaning tool that overwrites by default is one bad flag away from destroying someone's dataset; **unknown keys are preserved**, so a row carrying fields Soup does not model survives the round trip, where the easy version drops them and nobody notices until a training run is missing a column; and the CLI assertions go through an ANSI-strip helper, added when asked rather than argued about — the failure it avoids has turned this repo's CI red four separate times on Linux and macOS while passing on Windows. Verified here on the merged tree: 48 passed including #855's docs-completeness guard and #1057's repo-wide Click flag ratchet. Twelve commits are theirs; the maintainer's single commit on top pins the serialisation-equality check so a row reported as unchanged is byte-identical rather than merely re-serialising the same way ([#766](https://github.com/MakazhanAlpamys/Soup/issues/766), [#718](https://github.com/MakazhanAlpamys/Soup/pull/718))+ - `soup autopilot` asks for a missing `--model`, `--data` or `--goal` in a terminal, instead of a third setup command. The design was settled on the issue first, and the first version was parked as a draft until then. Prompted answers reuse the flags' validation, and scripts and CI still get the unchanged missing-option error with exit code 2. 8 new tests (5 fail on main), 11 of 11 guard mutations killed ([#1576](https://github.com/MakazhanAlpamys/Soup/issues/1576), [#1577](https://github.com/MakazhanAlpamys/Soup/pull/1577))- **Chinmaya Sahu** ([@csking101](https://github.com/csking101))- DPO example config, sample data, and tests ([#48](https://github.com/MakazhanAlpamys/Soup/pull/48))@@ -466,6 +467,7 @@ Listed by first contribution. PR numbers link the work.- `soup ab` estimated the variance from the rows it tested, so its two-sided mSPRT needed a 30-40 row burn-in, was calibrated only to 1000 rows and `--alpha 0.01`, and still sat at 0.011 there. They replaced it with the normal-inverse-gamma mixture Bayes factor, which depends on the rows only through the t statistic, so the false-positive bound holds at any number of looks: worst simulated 0.033 at `--alpha 0.05` and 0.0066 at 0.01, from 7 rows per arm. **The part worth copying is that the cost is published next to the gain**: `accept_h0` is slower when there is no difference (281 pairs against 43 at 0.5 sd), and that table sits in the docs, the record and the changelog. Across four review rounds every edge review found became a refusal or a guard with a test a mutation kills: a near-constant held-out column, an overflowing prior at a small row count, a variance that underflows to 0, and a saturated start that had ended 99% of simulated runs in a wrong `accept_h0`, now held at `continue` while the tested rows spread more than 3 times the held-out ones (0 such runs in 2000, 15 of 6000 Gaussian first verdicts changed, no rejection). 208 passed across the `soup ab` suite; 16 of 17 mutations of the final changes killed ([#1265](https://github.com/MakazhanAlpamys/Soup/issues/1265), [#1419](https://github.com/MakazhanAlpamys/Soup/pull/1419))- `training.freeze_layers` and `training.freeze_ratio` loaded on all 23 tasks but are read in exactly one place, `SFTTrainerWrapper._setup_transformers`. On the other 21 tasks a `freeze_layers: 2` run trained every layer and said nothing. They refused the fields at load on those tasks and kept `tts` on the applying side, because its wrapper inherits the SFT setup. They tied the refused list to the trainers with an AST scan of `trainer/dispatch.py` instead of a hand-kept table, pinned the refusal on every backend, and filed the remaining within-`sft` gap as #1581. 106 tests; every reachable mutation killed ([#1497](https://github.com/MakazhanAlpamys/Soup/issues/1497), [#1532](https://github.com/MakazhanAlpamys/Soup/pull/1532))- `soup ab` reached `accept_h0` slowly when there was no difference: under their own #1265 statistic the Bayes factor had to fall to `log(beta / (1 - alpha))`, which took 621 pairs per arm on average at 0.3 standard deviations. They read the same mixture the other way, as an always-valid confidence sequence for the difference, and accept once it lies inside +-effect_size: 307 pairs at 0.3 sd and 117 at 0.5, with the reject rule unchanged byte for byte. **The part worth copying is how the decision was made**: both readings of `--beta` were measured on the same replayed runs and put in the PR with their costs (level beta was faster, 220 pairs against 307 at 0.3 sd, but took power at effect_size from 0.997 to 0.964). The maintainer chose level alpha, and the record keeps the option not taken. `--beta` is retired through the existing one-release deprecation staging: it warns once and changes no verdict. 466 passed across the `soup ab`, deprecation, fragment, startup and ANSI-guard tests; 27 of 30 mutations killed, the survivors an exact float tie and an unpinned `--beta 0` warning ([#1418](https://github.com/MakazhanAlpamys/Soup/issues/1418), [#1575](https://github.com/MakazhanAlpamys/Soup/pull/1575))+ - Kept their own #1419 release-note entry true after #1575 retired `--beta`: the entry said the `--alpha` + `--beta` < 1 check "stays" although it is in no tagged release and #1575 removes it, and pointed at #1418 instead of quoting the new 117-pair figure. Changelog-only; verified that neither v0.75.1 nor v0.75.2 carries the check, fragment test 21 passed, and every fragment assembled cleanly on main + #1575 + this PR; they flagged the matching #1378 sentence instead of editing another contributor's entry ([#1575](https://github.com/MakazhanAlpamys/Soup/pull/1575), [#1635](https://github.com/MakazhanAlpamys/Soup/pull/1635))- **GitFromRatatouille** ([@swalla02](https://github.com/swalla02))- First contribution, and it is the third instance of this repo's most persistent bug class found by someone else ([#363](https://github.com/MakazhanAlpamys/Soup/issues/363), [#423](https://github.com/MakazhanAlpamys/Soup/issues/423), [#659](https://github.com/MakazhanAlpamys/Soup/issues/659)): `soup migrate` refused **any** input named `*.jsonl`, a valid LLaMA-Factory YAML config included, because the guard branched on the filename while the content sniff written to gate it had **zero call sites in `src/`**. The diagnosis is worth more than the one-line fix — the test was named after the command and its body called the helper, so it passed on a codebase where `migrate` never imported it. **Then review found a regression their own fix introduced, and the way they closed it is the part to copy**: the sniff read `utf-8`, so a UTF-8 BOM survived as U+FEFF, which `str.strip()` does not remove, and a real BOM'd JSONL silently lost the friendly error it used to get — on a project with three Windows CI cells where PowerShell's `Out-File` writes that BOM by default. Their BOM test **guards its own fixture** (asserting the file really contains a BOM before asserting behaviour) and their bounded-read test measures the property with `tracemalloc` rather than pinning the spelling of the loop. Six mutations, six killed; zero assertions removed. They also **declined to widen the fix** to files whose name gives no hint, correctly citing the `.ipynb` case the original comment warns about, and left that as an open question rather than guessing ([#672](https://github.com/MakazhanAlpamys/Soup/issues/672), [#675](https://github.com/MakazhanAlpamys/Soup/pull/675))