Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

docs(contributors): #1711, #1712, #1722 [skip ci]

Alpamys3b4684800277
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 16dd121b..5713c0e6 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -386,6 +386,7 @@ Listed by first contribution. PR numbers link the work.
- The regex PII baseline behind `soup expect`, `soup data pii` and `soup data score` was **quadratic** on long `[\w.+-]` runs with no `@`: the email pattern restarted at every word boundary, so one 50 KB row of `1-1-1-...` took 14-20 s, paid again for every such row. They made a match start only where a run starts, keeping the rule that the local part needs a word character, and **pinned both sides of the trade**. An 8N-versus-N ratio test covers the speed: 59-66x on `main`, worst 11.8 of 300 repeats against a limit of 32 with the fix. A seeded differential against the old pattern, with the two known snippet differences named, covers the detections. Row flags are identical by construction, and in review 7.2 million exhaustive strings plus 100,000 random rows showed 0 disagreements. 7 of 7 mutations of the fix fail their tests ([#1329](https://github.com/MakazhanAlpamys/Soup/issues/1329), [#1360](https://github.com/MakazhanAlpamys/Soup/pull/1360))
- Closed #1309, a setting that was accepted and then ignored: `training.gdpo_variant` loaded on `task: dpo` and `task: preference` and its description promised to replace the trainer's preference loss, but on trl >= 0.29 the `DPOTrainer.dpo_loss` hook it relied on is gone, so every variant trained exactly the default loss and nothing said so. They took the owner's "refuse" ruling and kept to it: a `mode="before"` field validator that refuses every non-null value, so `bogus`, `false`, `""` and `[]` get the same message as the real variants and the task and backend gates cannot mask it. **What makes it a good change**: every test the earlier EBFT refusal (#1279) had handed to this fix was inverted rather than deleted — loads-as-valid became refused, the two gate-unchanged tests became "refusal precedes the gate", the silent `False` from the legacy hook became a `ValueError` — and the refusal text names the nearest real alternative while saying it is not identical. 452 tests in the four touched files (44 fail on a clean `main`); 12 mutations of the validator, its message and the `live_wired` flags, 12 killed ([#1309](https://github.com/MakazhanAlpamys/Soup/issues/1309), [#1515](https://github.com/MakazhanAlpamys/Soup/pull/1515))
- Took the `soup data score` slice of [#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), an option that was validated, announced and then read by nothing: `--benchmarks` and `--threshold` were accepted and decontamination was always called with no texts, so the scorecard printed `Decontaminated 0` for any input. They added `--benchmark-file` and wired the supplied texts and the threshold to the real 8-gram kernel, refuse labels alone by name, and made the "not run" case say so instead of showing a zero. **What makes it worth keeping**: asked what the `-b` labels do once a file is given, they did not argue it — they put the answer in the help text, the docs, a printed note and a test — and every refusal (labels alone, malformed or non-object JSONL, a truncated file, an empty or unusable corpus) comes before a scorecard prints, so a bad corpus can no longer read as a clean result. 34 tests (22 fail on a clean `main`); 16 mutations of the wiring, the strict loader and the core validation, 16 killed ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1518](https://github.com/MakazhanAlpamys/Soup/pull/1518))
+ - 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))
- **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))
@@ -562,6 +563,8 @@ Listed by first contribution. PR numbers link the work.
- Two more rows off the #275 model-family tracker, `minimax-m3-dpo` and `mistral-large-3-dpo`, each the DPO sibling of an existing SFT entry. **Both base repo ids were re-checked with `huggingface_hub.model_info(..., token=False)` rather than with an HTTP status**, which is the exact distinction [#661](https://github.com/MakazhanAlpamys/Soup/issues/661) exists for and the step most recipe PRs skip. They also took two bookkeeping corrections without argument — the fragment was named after the issue instead of the PR, and the credit line named the wrong number — and the follow-up diff was the rename plus two lines with nothing else touched, which is what makes a correction round cheap to re-verify ([#849](https://github.com/MakazhanAlpamys/Soup/issues/849), [#933](https://github.com/MakazhanAlpamys/Soup/pull/933))
- Added the `qwen3.6-27b-dpo` and `qwen3.6-27b-grpo` recipes, taking the catalog to 176. All three review asks landed, and the cross-reference was fixed the stronger way: the recipe count was dropped from it rather than bumped, so that sentence cannot go stale again. On the tree merged with `main`, the count agrees at all nine sites and the config snapshot is a clean regeneration. The changelog says plainly that the 27B configs were validated against the schema and the CLI but not trained ([#845](https://github.com/MakazhanAlpamys/Soup/issues/845), [#1015](https://github.com/MakazhanAlpamys/Soup/pull/1015))
- `soup loop canary --traffic 5%` wrote a policy that serving and the watch daemon never read, so there was no traffic split, no live verdict and no rollback. Keyed `/v1/chat/completions` requests now follow the configured split, and every outcome, streamed errors included, is recorded against a per-promotion rollout id. `soup loop watch` rolls back a `MAJOR` canary after at least 30 samples and keeps a healthy one. Across four review rounds each surviving mutation was closed with the discriminating test, and on the merged tree 17 of 17 mutations fail a test ([#815](https://github.com/MakazhanAlpamys/Soup/issues/815), [#1104](https://github.com/MakazhanAlpamys/Soup/pull/1104))
+ - `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))
- **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))