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): #2060 [skip ci]
Alpamysaae9a7d9ce7a
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 95e5aba2..07d6db6e 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -465,6 +465,8 @@ Listed by first contribution. PR numbers link the work.- Filed #1543 with both causes already diagnosed, each of which checks out against the hub release notes and `refuse_if_data_parallel`, and took it themselves: the proof notebook's install cell pulled `huggingface_hub` 1.32, whose shared blob store soup-cli 0.75.0 refuses (#1509), and the notebook left two CUDA devices visible, so layer streaming refused to start under `nn.DataParallel`. They capped the hub below 1.32 with a comment that says when to drop it and set one visible device before torch is imported. **In the second round they took the guarded `setdefault`, so a caller who chose their own card keeps it, and added the fragment and the two tests the first review asked for.** Only cell 3 changes (outputs identical in all 19 cells); the two new tests are 2 failed / 7 passed on `main`, and 4 of 4 targeted mutations are caught ([#1543](https://github.com/MakazhanAlpamys/Soup/issues/1543), [#1545](https://github.com/MakazhanAlpamys/Soup/pull/1545))- Closed #1772 (reported by @taljeon): `eval.calibrate.kl_divergence` floored the candidate probability at `1e-12`, which caps the log ratio near 27.6, so `run_calibration` returned `MINOR` (0.129108187945) for candidate gaps of 60, 115 and 1000 whose true KL is 0.3233, 0.6533 and 5.9633, all above the 0.20 MAJOR boundary. They replaced the floor with a log-sum-exp log-softmax and a direct `P_i * (log P_i - log Q_i)` sum, and the new values match a 120-digit Decimal reference to 3.4e-16 relative. **The part worth copying is what the first review made them close**: two saturated prompts overflowed `sum(per_prompt)` to `inf` and made `classify_kl_delta` raise `ValueError`, and they answered with a clamped mean plus exact-value tests for 2-, 3- and mixed-prompt batches rather than a weaker claim. Restoring the old floor fails 12 of their 34 tests. Two things the tests do not pin are left as known: the `max(0.0, ...)` lower clamp, and three redundant guards ([#1772](https://github.com/MakazhanAlpamys/Soup/issues/1772), [#1780](https://github.com/MakazhanAlpamys/Soup/pull/1780))- Fixed #1773, reported by @taljeon: a `NaN`, `-inf` or `+inf` baseline (and `-1e999`, which JSON decodes as negative infinity) let `soup eval gate` print `GATE PASSED` and exit 0, because `score - NaN` is NaN and the regression comparison is false, while `1e999` was misreported as a regression instead of an invalid input. They put a finite check at every boundary rather than only the reader the issue named: flat files and stamped envelopes, registry rows (which went through a bare `float()`), both baseline writers, and `run_gate` for direct callers, where a non-mapping baseline or a non-number score is a `TypeError` and a non-finite one a `ValueError` naming the task; the CLI exits 3 before any task runs. **The part worth copying is that each boundary has its own tests**: removing the guard at any one of them fails named tests (1 to 19 in six mutations), and the registry path is reached both through a real database and a mocked store. The review round was answered point by point, and the 400-digit integer `OverflowError`, which behaves the same on main, is stated as a known gap. 40 tests, 609 passed with the neighbouring gate, baseline, ship and registry files ([#1773](https://github.com/MakazhanAlpamys/Soup/issues/1773), [#1779](https://github.com/MakazhanAlpamys/Soup/pull/1779))+ - Written with @harshitthek. The GRPO gradient watchdog zeroed a step with a nan gradient but said nothing about where it came from; its warning and `trainer_state.json` now name how many parameters went non-finite and the first few, a failing scan warns once and fails open, and a resumed run restores its skip counters. A CPU test injects a nan into a real module, and both review rounds were answered in one push each, the second adding the test that pins the per-step name cap ([#342](https://github.com/MakazhanAlpamys/Soup/issues/342), [#2060](https://github.com/MakazhanAlpamys/Soup/pull/2060))+ - Wrote the #2060 watchdog step with @here-2007 after the #342 investigation: the warning and `trainer_state.json` now name the non-finite parameters. Took every item of the review (a one-shot warning on a failing scan, control characters stripped from the displayed names, the dead state attributes removed, the per-step versus run-summary count documented, and a test that pins the per-step cap after a surviving mutation was shown) and kept the claim on #342 for the root cause ([#342](https://github.com/MakazhanAlpamys/Soup/issues/342), [#2060](https://github.com/MakazhanAlpamys/Soup/pull/2060))- **Samarth Mukhija** ([@Samearth17](https://github.com/Samearth17))- First contribution, and it answers the awkward half of #379: the repo could not reproduce its own benchmark records, because most of those harnesses only ever existed in a scratchpad on a machine that is gone. They published the upstream bitsandbytes #2034 NF4 reproducer as a standalone, download-free script and left the methodology and the existing table row untouched — a reproducibility slice that reproduces, rather than a rewrite. **Review blocked on the one thing that matters for a harness: it exited `0` whether or not the defect was present**, so it could not distinguish the mechanism it claims to demonstrate from a machine where nothing is wrong. They fixed it in both directions — an explicit `--bypass-pool` negative control, *and* an ordinary invocation that now requires the NF4 mismatch, so a removed `pool.acquire()` fails instead of passing quietly. Verified on real CUDA at merge: normal run reproduces on 6/8 layers with the bf16 control clean on 8/8; cutting `pool.acquire()` exits 1 on the merged head and exited **0** on the pre-fix commit. They also said plainly that they could not run it themselves — no GPU — instead of implying they had ([#589](https://github.com/MakazhanAlpamys/Soup/pull/589))