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): #1580, #1588, #1592, #1601 [skip ci]
Alpamysffdd302e011d
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 44c5f58d..e1a2c9f9 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -356,6 +356,8 @@ Listed by first contribution. PR numbers link the work.- Made `soup migrate --from unsloth` read real Unsloth notebooks: IPython magics were parsed as Python, so every official notebook was refused as one `SyntaxError`. Their per-cell transform treats a `!` / `%` line as a magic only at statement level. That keeps `%` / `!=` continuation lines as Python, and a magic that opens a suite becomes a `pass`, so the block stays valid. It keeps the bodies of `%%capture`-style cells, treats a backslash-continued install as one magic, and makes a real syntax error name its cell and line. All 82 official GRPO notebooks migrate (0 on `main`). On the final head 129 migrate tests pass, 217 pass on the merged tree, and 8 of 8 mutations are caught ([#1579](https://github.com/MakazhanAlpamys/Soup/issues/1579), [#1583](https://github.com/MakazhanAlpamys/Soup/pull/1583))- On transformers 5 the routed experts of an MoE are fused 3-D parameters, so `moe_lora` adapted attention only on Mixtral, MiniMax, Qwen2-MoE and Qwen3.5-MoE, and `moe_expert_quant` reported `applied to 0 expert Linear block(s)` as success. They found the fused parameters by shape, carried them on the resolved targets into `build_lora_config` so every MoE-wired trainer adapts the experts without a call-site change, widened the expert scan to return the fused block, and made the quant refuse it by name. Measured per family before and after; on the merged tree 4155 passed, 26 skipped across 72 related files, and removing the parameter merge fails 15 tests ([#1421](https://github.com/MakazhanAlpamys/Soup/issues/1421), [#1590](https://github.com/MakazhanAlpamys/Soup/pull/1590))- Made the provenance and compliance artifacts record only what was measured. The `--invocation` of `soup attest emit` now reaches the SLSA statement, and Annex XI / XII write `not measured` instead of zeros. The CycloneDX 1.6 ML-BOM gets an RFC 4122 serial number and canonical SPDX ids, expressions or names. The SPDX 2.3 document gets the right dependency direction and a defined `LicenseRef-` for every license it uses. The receipt fills `driver_version` on a CUDA host. Each artifact is tested against its own specification: a vendored CycloneDX 1.6 schema, a real ed25519-signed statement and the real Annex XI writer. It took five rounds, adding verbatim stdout, a small SPDX expression parser, per-operand `LicenseRef-` entries and a mixed-case operator row, each with its own mutation. On the final head: 278 passed, 0 failed across 8 files, before and after a trial merge with main; 48 of 59 new tests fail on main; in the last two review rounds 23 of 26 mutations caught, one harmless, and both survivors closed by a row added for each ([#1446](https://github.com/MakazhanAlpamys/Soup/issues/1446), [#1569](https://github.com/MakazhanAlpamys/Soup/pull/1569))+ - Made a `training.prm_reward` Hub id work. The reward head was read only from a local directory, so a GRPO run given `org/name` loaded both models and then died at the first reward call. They download the id (with `@revision`) through Soup's Hub wrapper, so the namespace-pin gate runs first. An existing directory wins over the repo-id shape, and a checkpoint with no reward head is refused at build time, naming the configured value. Two review rounds; each blocking item is pinned by a test that fails when the change is undone. 252 passed on the merged tree; 12 of 12 mutations caught; the new file fails 12 of 14 on `main` ([#1466](https://github.com/MakazhanAlpamys/Soup/issues/1466), [#1580](https://github.com/MakazhanAlpamys/Soup/pull/1580))+ - A grpo run with `eval_steps` reported TRL's policy objective as `val_loss` everywhere Soup shows a validation number, and the held-out reward reached only `trainer_state.json`. They added a per-task validation-metric table, so grpo records `eval_reward` as `val_reward` in the panel, the tracker (with a lazy migration for existing databases) and the event stream, and every other task is unchanged. A real tiny CPU grpo run proves the tracker series matches `trainer_state.json`. In review they reserved `val_reward` from `benchmark:` gating, which closed a regression verdict computed from training data. 238 passed across 9 related files; 4 of 4 mutations caught on the final head ([#1389](https://github.com/MakazhanAlpamys/Soup/issues/1389), [#1592](https://github.com/MakazhanAlpamys/Soup/pull/1592))- **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)).@@ -798,6 +800,7 @@ Listed by first contribution. PR numbers link the work.- 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))- First contribution, one slice of the #1448 audit: `soup serve` dropped `--structured-output` / `--json-schema` / `--regex-pattern` and `--reasoning-parser` on streaming chat completions, so `stream: true` returned unconstrained text with the `<think>` block still in it while the same request without streaming was constrained and stripped. They claimed that one item, wired the processors, the n-gram config and the reasoning parser into the streaming path exactly as the non-streaming handler does, and stripped the text before both the SSE chunks and the trace log. **Review found that the first constraint test mocked the builder, so building for `None` (the reported bug) still passed; they added the parity test the review supplied, which drives the same app with and without `stream` and compares what the client sees and what generation receives.** 5 tests fail on `main`, 11 of 11 mutations of the constraint, n-gram and parser hand-offs are caught, and 1231 serve-related tests pass with `main` merged ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1607](https://github.com/MakazhanAlpamys/Soup/pull/1607))- 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))- **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))@@ -805,6 +808,9 @@ Listed by first contribution. PR numbers link the work.- **Jay Song** ([@deximple](https://github.com/deximple))- First contribution: a `soup sweep` arm whose trainer construction or `setup()` raised stayed `running` in the experiment tracker forever, because both calls ran before the `try` that marks a run failed. They moved them inside it, recorded the reason through the formatter `soup train` already uses, and tested both failure stages against the real SQLite tracker, including that the original exception propagates and training never starts. 2 tests (both fail on `main`), 6 of 6 mutations killed ([#1464](https://github.com/MakazhanAlpamys/Soup/issues/1464), [#1640](https://github.com/MakazhanAlpamys/Soup/pull/1640))+- **Yunare Maia** ([@yunaremaia](https://github.com/yunaremaia))+ - First contribution: QuEST refused a local base with the wrong block count or width only after reading and SHA-256-hashing every weight file and loading the model. They added a gate that runs on `config.json` before anything is hashed, placed inside `resolve_base_model_identity` so the v1-resume re-resolve is covered too. The gate shares one refusal constant with the post-load gate and leaves any value it cannot read to that gate. **Their tests count the hashed files, so they pin the order, not just the refusal. Across three review rounds they closed every mutation we found: a message-drift survivor, a dead branch, a `!=` gate tested with one layer count, an unpinned merge precedence and a bool-as-width case.** 21 tests (11 fail on `main`), 13 of 14 mutations killed ([#1199](https://github.com/MakazhanAlpamys/Soup/issues/1199), [#1588](https://github.com/MakazhanAlpamys/Soup/pull/1588))+---Want to join this list? See [CONTRIBUTING.md](CONTRIBUTING.md) — good first issues are