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(contrib): credit vaputa for the #1839 contribution (#1965)
Alpamys Makazhan73e8a893ef89
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 2d6dba36..89417521 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -852,6 +852,7 @@ Listed by first contribution. PR numbers link the work.- `training.grad_accum_auto_tune` measured VRAM pressure against a fixed 24 GB, so it could never fire on an 8 GB card and fired at 28% use on an 80 GB one. They read the card's real total memory lazily on the first advisory call, read the peak from the same device, kept an explicit `grad_accum_total_vram_gb` as an override, and put the measured numbers in the advisory. **The PR description named the one existing assertion the change had to touch, and why.** When review showed the `on_log` gate, the enabled guard and the same-device claim were not covered by any test, they added all three tests in one push. 9 of 10 mutations killed, and the tests give 7 failed on `main` ([#1620](https://github.com/MakazhanAlpamys/Soup/issues/1620), [#1625](https://github.com/MakazhanAlpamys/Soup/pull/1625))- `training.auto_mixed_precision` loaded on all 23 tasks, but only the SFT trainer (and `tts` through it) reads it, so a DPO, GRPO or KTO run that set it trained at its trainer's default precision and said nothing, and Autopilot's flat `generate_config` helper wrote the key for any task. They refused `true` outside a named `AMP_APPLYING_TASKS = {sft, tts}` at config load, with the field, the task and the fix in the message. `false` still loads everywhere. The validator sits between the #795 resolver and QuEST check and the unsloth refusal, the generator is scoped to the same set, and the GRPO `grpo_fp16` message, the field description and the docs were corrected. **The part worth copying is the test table**: the gate is parametrized over every value of the `task` Literal with `sft`/`tts` listed literally, so a new task is refused by default and the controls cannot drift with the constant. When review found that nothing pinned SFT keeping the field in the generator, they added that control. 7329 tests pass across 61 related files (23 of their tests fail on `main`); 8 mutations killed in the first round and 6 in the final one ([#1618](https://github.com/MakazhanAlpamys/Soup/issues/1618), [#1627](https://github.com/MakazhanAlpamys/Soup/pull/1627))- Every `SOUP_LAYER_STREAM_STRIPE_DIRS` refusal printed the entry with `repr`, so a Windows path came out with every backslash doubled and could not be copied back. They added `quote_path()`, which keeps a path as typed inside single quotes and escapes exactly the control characters the validation refuses, and used it at every site in the issue's table, including four Windows API errors that only fire on Windows. **They listed the spellings first (drive letter, UNC, spaces, trailing separator, POSIX, relative) and tested each one.** After review they added the changelog fragment, moved the helper to a neutral module and added a UNC case. 22 new tests (the file does not collect on `main` without the helper), 11 of 11 mutations killed ([#1611](https://github.com/MakazhanAlpamys/Soup/issues/1611), [#1626](https://github.com/MakazhanAlpamys/Soup/pull/1626))+ - Improved loopback Web UI host validation and IPv6 controls ([#1829](https://github.com/MakazhanAlpamys/Soup/issues/1829), [#1839](https://github.com/MakazhanAlpamys/Soup/pull/1839))- **Akshat Shah** ([@akshatshahh](https://github.com/akshatshahh))- First contribution: `http://[::1]:<port>` was accepted by the judge API-base and vLLM checks but refused by eval-gate suites, `soup ship --judge-model` and the online-DPO trainer, because three gates kept their own `("localhost", "127.0.0.1")` literal and two more kept a third copy. They made all five import `net_guard.LOOPBACK_HOSTS` and added an AST ratchet that fails on any rebuilt loopback literal, including single-quoted and multi-line spellings. Their 27 tests: 11 fail on main, 27 pass here; 7 mutations, all killed ([#1548](https://github.com/MakazhanAlpamys/Soup/issues/1548), [#1554](https://github.com/MakazhanAlpamys/Soup/pull/1554))diff --git a/changelog.d/0.76.0/1839.fixed.md b/changelog.d/0.76.0/1839.fixed.mdindex 8155ef19..da1bb6a6 100644--- a/changelog.d/0.76.0/1839.fixed.md+++ b/changelog.d/0.76.0/1839.fixed.md@@ -1 +1 @@-- **`soup ui` validates the served Host names on a loopback bind.** Requests must name the bound host or `localhost` / `127.0.0.1` / `[::1]` with the bound port; an omitted port means HTTP port 80. Foreign names, wrong ports and missing, malformed or duplicate headers get `403 {"detail": "Host not allowed"}` before authentication, body reads or routes, with the normal security response headers. This closes the Host/Origin hardening gap in the session-cookie check. `--public` keeps its Bearer gate, and the startup login URL is unchanged (#1829 in #1839).+- **`soup ui` validates the served Host names on a loopback bind.** Requests must name the bound host or `localhost` / `127.0.0.1` / `[::1]` with the bound port; an omitted port means HTTP port 80. Foreign names, wrong ports and missing, malformed or duplicate headers get `403 {"detail": "Host not allowed"}` before authentication, body reads or routes, with the normal security response headers. This closes the Host/Origin hardening gap in the session-cookie check. `--public` keeps its Bearer gate, and the startup login URL is unchanged (#1829 by @vaputa in #1839).