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): #1924 [skip ci]

Alpamysc44934eb0a22
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 9277490e..82ccb9ea 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -834,6 +834,7 @@ Listed by first contribution. PR numbers link the work.
- Took #1444: with `gradient_accumulation_steps` above 1, `task: prm` and `task: sft` with `data.format: raft` logged `loss`, `train_loss` and `grad_norm` G times too large (4.000x at the default G=4) and clipped a gradient G times too large, because both trainers return their own per-micro-batch mean while transformers still treated the model as one that accepts loss kwargs and skipped its `1 / gradient_accumulation_steps` division. They posted the plan on the issue first (`num_items_in_batch` is a label count, so it cannot express RAFT's `loss_weights` total), then set `model_accepts_loss_kwargs = False` in both trainers. **The part worth copying is the real-wrapper comparison**: PRM and RAFT run through their actual wrappers at `batch_size: 1` with four identical rows, once at G=1 and once at G=4, and the first logged `loss` and `grad_norm` must agree, beside a class-level ratio probe and a citation-boosted RAFT case; the fixture hides MPS from `transformers.training_args`, which caches accelerator availability. Five tests; flipping the flag back fails 2 PRM tests or 3 RAFT tests, and the neighbouring PRM and RAFT test files give 531 passed. The optional guard over all `compute_loss` overrides is not included ([#1444](https://github.com/MakazhanAlpamys/Soup/issues/1444), [#1771](https://github.com/MakazhanAlpamys/Soup/pull/1771))
- A polish of their own translation. `README.zh.md` rendered the pre-repair and post-#331 measurement sets of the 8B figure as "一行" / "两行" (a calque of "row", which reads as lines of text) and the clock-adjusted comparison as "按单位时钟频率算". They changed five lines in three places (the figure paragraph, the figure's alt text, the Citing Soup bullet) to "那组数据" / "两组数据" / "折算", leaving every number, link target, code span and tag identical, and no re-stamp is needed because `README.md` is untouched. Prose only; review compared tokens per hunk and the per-section sets of the translation ratchet (all identical), no tests to mutate. ([#1699](https://github.com/MakazhanAlpamys/Soup/pull/1699), [#1836](https://github.com/MakazhanAlpamys/Soup/pull/1836))
- Polished the zh What's New wording (validation hold-out, CPU-core binding) with numbers and code spans unchanged; fixed the 70B-shaped store phrasing after review ([#1825](https://github.com/MakazhanAlpamys/Soup/issues/1825), [#1837](https://github.com/MakazhanAlpamys/Soup/pull/1837))
+ - Took #1442: `extract_mcq_letter` read `**B**`, `Answer: **B**`, a letter followed by a line break and `B is the correct answer.` as no answer, so a model that bolded every letter scored 0.000 on `MINI_MMLU` where plain letters scored 1.000. They added a wrapped-letter form (emphasis, quotes, backticks, brackets) to the last-wins tier and a leading-letter fallback, and kept lowercase quoted prose, boxed values and prose openers at no credit. **The part worth copying is how both rounds closed**: round one's edge cases (`'B'`, `B - because ...`, lowercase quoted prose, CRLF) each came back as a row or test that fails when its regex piece is removed, and round two's three unpinned guards (the start anchor of the leading form, a wrapped letter overriding an earlier cue or box, the later of two wrapped letters winning) came back as the four proposed cases with no source change. 35 tests pass plain and under `FORCE_COLOR`, 21 fail on the merge-base, and all ten mutants I ran are caught (1 to 16 failures); a leading letter anchored per line instead of per output is not pinned ([#1442](https://github.com/MakazhanAlpamys/Soup/issues/1442), [#1924](https://github.com/MakazhanAlpamys/Soup/pull/1924))
- **Maxi** ([@maximilianfeix](https://github.com/maximilianfeix))
- AutoDistill's vocabulary guards and the weight shards' `retain_bytes=False` were pinned by no test. Disabling both guards and turning full-RAM hashing back on left all 41 autodistill tests passing. Tests now cover the capture guard for both bounds, the worker's own guard before the teacher loads (on a dataset that still matches its fingerprint), and a shard hash that retains no bytes. **They noticed the `-1` cases still passed with the capture guard off, because `CaptureToken` raises the same phrase, and said so in the PR instead of shipping them as coverage. Anchoring the matches on the full message closed the gap on the next push.** Every mutation fails the new tests: whole guard 4, lower bound 2, context and prompt bypasses 2 each, worker guard 1, teacher loaded first 4, each retention mutation 1 ([#1341](https://github.com/MakazhanAlpamys/Soup/issues/1341), [#1400](https://github.com/MakazhanAlpamys/Soup/pull/1400))