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): #1678, #1679, #1681, #1707, #1719, #1673, #1559 [skip ci]

Alpamys0a5ed547960e
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index aef155eb..16dd121b 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -364,10 +364,13 @@ Listed by first contribution. PR numbers link the work.
- 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))
- `data.add_new_tokens` / `new_special_tokens` loaded and were silently dropped on every unsloth setup, on MLX, under layer streaming and on twelve tasks whose trainers never call the expansion helper. They refused them at config load, ordered so switching backend never meets a second refusal, and re-measured every (task, backend) pair against the current trainers. Over three rounds they exempted SFT's vision/audio paths on unsloth and let a task's own backend refusal speak first. On the final head: 129 passed in the new file, 6 of 6 mutations caught, 186 configs probed, and 6794 passed / 0 failed across 86 files merged with main ([#1358](https://github.com/MakazhanAlpamys/Soup/issues/1358), [#1622](https://github.com/MakazhanAlpamys/Soup/pull/1622))
- Made every documented `soup` invocation resolve in the live CLI. They corrected six spellings from the issue and about sixteen more the reviews surfaced, and wrote a guard that walks the Click tree over every `soup ...` line and inline span in `docs/*.md` and `README.md` and every recipe description. It handles global options, `--no-*` flags, groups that run on their own, routed default subcommands, aligned columns and `VAR=value` prefixes. Over three rounds every gap came back closed with a control row. On the final head the guard, #979's guard and the translation sync test give 111 passed on the merged tree, and 12 of 12 mutations are caught ([#1465](https://github.com/MakazhanAlpamys/Soup/issues/1465), [#1578](https://github.com/MakazhanAlpamys/Soup/pull/1578))
+ - Filed #1393 from the #1145 measurements and then fixed it: DPO built `AutoModelForCausalLM` whatever `modality` said, so a vision-language wrapper checkpoint (MiniMax-M3) could not load in DPO. They gave the DPO wrapper SFT's vision path (processor, pad-token mirror, vocab expansion through the processor's tokenizer, LoRA on the language tower) and **answered the open trl question by measurement**: a real DPO step on a tiny LLaVA showed trl keys its vision collator on an `images` column, not on the processor, so text-only preference rows train. Review found the preflight answered DPO + `audio` wrongly (a green verdict for a config the trainer cannot load) and missed a `preference_loss_weights` blend led by dpo in both the preflight and the unsloth refusal; the fix was one per-trainer modality map plus resolving the blend by its largest weight in both places, with a control test against widening the refusal, and their re-measured mutation counts reproduced exactly. 17 of 19 mutations killed (the two survivors only change an equal-weight tie, which I recorded rather than blocked on), 111 tests in the two PR files, 2531 on a trial merge with `main` ([#1393](https://github.com/MakazhanAlpamys/Soup/issues/1393), [#1707](https://github.com/MakazhanAlpamys/Soup/pull/1707))
- **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)).
- Added four validated DeepSeek-R1-Distill recipe entries with synchronized catalog counts, documentation, and Hub-backed model metadata tests ([#569](https://github.com/MakazhanAlpamys/Soup/pull/569)).
+ - Took `soup local-rl train --backend` from #1448: validated, then read by nothing, so the rendered nightly job was byte-identical for `--backend ollama` and `--backend mlx`. A first version rendered the value into the unit files; when review showed that the training step has no `ollama` backend to select, they reworked it to the honest half in one commit on top of the PPO fix it had collided with: the option is validated, not rendered, and prints one note that it has no effect on training — and then closed the last point (the note fired on every call, including the nightly `--once` run that never passes the flag) with a default of `None` and a test for that path. 18 tests in the file, 564 passed / 14 skipped with eleven neighbouring files on a trial merge with `main`; seven mutations (note deleted, unconditional, inverted, `--backend` rendered, default changed, allow-list disabled, value dropped before validation) each fail a named test ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1678](https://github.com/MakazhanAlpamys/Soup/pull/1678))
+ - `soup export --registry-id` and `--deploy` did something only on the plain GGUF branch, so eight export formats finished "successfully" with nothing recorded in the registry and nothing deployed. They claimed that one row of the #1448 audit with a plan first, refused `--deploy` up front for the five formats Ollama cannot load, forwarded it for the three that produce a GGUF, and wired the registry attach into every format. After review they dropped an unrelated commit, made a TensorRT export record its engine files, recorded every shard and data file with the names in the success line, and added a test that stubs only the third-party converters, which pinned the seven helper returns that the first set of tests had replaced. 32 tests fail on `main`; 26 of 28 mutations are caught, including all seven return mutations ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1679](https://github.com/MakazhanAlpamys/Soup/pull/1679))
- **Tal** ([@taljeon](https://github.com/taljeon))
- First contribution, and it closed a gap in a guard that was **one day old**: the `dtype=` scanner from #489 matched only class names starting with `AutoModel`, so the same load-breaking kwarg on a CONCRETE class — `WhisperForConditionalGeneration.from_pretrained` in the ASR training path — was invisible to it. They took the **suffix rule** rather than a name allowlist, which is the harder and correct choice: an allowlist silently stops covering a class added later. Verified with a negative control rather than by inspection — `dtype="auto"` on the real Whisper site fails by name on their branch and **survives on `main`**, so the gap was real. Two things I check on every widening they got right unprompted: the existing `AutoModel*` coverage was not traded away for the new coverage, and the scanner still ignores `FastLanguageModel`, `PeftModel`, `torch.zeros` and wrapper kwargs — a guard that fires on correct code is one people delete. All six deleted lines are renames or a reworded message; the file goes 11 tests to 12 ([#497](https://github.com/MakazhanAlpamys/Soup/pull/497))
@@ -530,6 +533,7 @@ Listed by first contribution. PR numbers link the work.
- Arabic and Japanese READMEs, both behind the same structural ratchet that gates the Turkish one they shipped in v0.75.0 — so a `README.md` edit now has to re-translate and re-stamp three files. Coverage is structural rather than listed (`translations()` globs `README.*.md`), which I proved by appending a line to `README.md` and watching the stamp test name both new files. All four files agree exactly: 21 headings with an identical level sequence position by position, 12 fenced blocks with an identical language sequence, 20 table rows, and the same 34 URLs and 34 relative paths, every path existing on disk. The translations are real rather than nominal — 89.2% of the Arabic prose letters are Arabic, 83.4% of the Japanese are kana/kanji, and the only long Latin-script line is the preprint citation, which correctly stays in English — with 13 `<span dir="ltr">` wrappers so the DOI and version strings still read left-to-right inside RTL prose. Four mutations, four killed, and the guard names the section and the differing command rather than counting lines ([#1100](https://github.com/MakazhanAlpamys/Soup/pull/1100))
- Built the CodSpeed trip-wire for `config/schema.py`'s import cost, the dominant leaf of `soup version`'s cold start that they measured in #780. It is one pytest-codspeed benchmark in its own non-required workflow, off until a repository variable enables it and never run on fork PRs, with no stored secret. **They corrected their own proposal in public**: the CodSpeed App's real permissions were far wider than the "read access" they had first described, so they listed them from the App's registration and left the install decision to the maintainer. The benchmark says in its own docstring what it does not measure, and the isolation test that guards its `sys.modules` restore kills all 4 mutations tried ([#1065](https://github.com/MakazhanAlpamys/Soup/issues/1065), [#1086](https://github.com/MakazhanAlpamys/Soup/pull/1086))
- Took the layer-streaming runtime off `soup version`'s import path, using the third option from #780, which they re-measured before proposing it. `config/schema.py` imported ten bounds from `layer_stream`, `async_disk_source` and `ship_verdict`, so every CLI start loaded six modules (`layer_stream`, `layer_shard`, `async_disk_source`, `safetensors_reader`, `queue` and `_queue`) to read ten numbers and two tuples. A dependency-free `utils/config_bounds.py` now holds them and the runtimes re-export it, so the schema bound and each runtime message stay one object. **They stated the saving at its honest size**: about 1.6% of `import soup_cli.cli`, with a wall-clock A/B inside the noise. They named the 22-25% drop in `import soup_cli.config.schema` on its own for what it is, the #780 trap in miniature rather than a win. **They also corrected my suggestion on #780**: an `is` check per re-export cannot see a copied `MAX_NOISE_FLOOR_RUNS = 10`, because CPython caches small ints. So the re-exports are pinned on the source text instead, counting every name bound in store context, the schema's included. Verified: config schemas, values and runtime messages are byte-identical to `main`, and CLI import goes from 526 to 521 modules, with exactly those six leaving. The 78 related test files pass, and all 12 mutations are killed, five of them only after the review round widened the guards ([#780](https://github.com/MakazhanAlpamys/Soup/issues/780), [#1368](https://github.com/MakazhanAlpamys/Soup/pull/1368))
+ - Reworded the shipped Turkish and Arabic READMEs to remove false friends and calques ("issue", "Serving", "gated", "wheels" had been rendered with words that mean something else), and kept the PR to what he can read: when asked who the "native-speaker" reviewers were he said they were LLMs, listed what a person had actually read (Turkish natively, Arabic at an upper-intermediate level, Japanese lower-intermediate), and split the Japanese part out himself. **The detail worth copying is the restraint**: he dropped his own `training.lora` code span from the Japanese file as soon as it was shown that the English sentence has none, and rejected the reviewers' decimal-comma suggestions because the ratchet keeps `README.md`'s digits. 93 changed lines compared removed against added show no difference in code spans, URLs, link targets, numbers or tags; the sync test gives 31 passed on the head, on `main` and on both merge orders with #1680 ([#1681](https://github.com/MakazhanAlpamys/Soup/pull/1681))
- **KJO92** ([@Konuktor](https://github.com/Konuktor))
- Stopped every in-process inference path from prompting a tuned model with a sequence it never trained on. `soup chat`, `soup serve`, `soup infer` / `soup bench`, `soup diff`, the `--mole` decoder, `soup data generate` and the `live_eval` generators behind `soup ship` / `diagnose` / `advise` all rendered the chat template to text and then let the tokenizer add its own special tokens, so a Llama-3 / Gemma / Mistral template produced a **doubled BOS** while Soup's default SFT path trains with one, and Soup's own `data.chat_template` presets (which render none) were prompted with one. **The design choice worth copying is the rule they chose over the obvious one**: not "drop a duplicate BOS" but "text a template rendered gets no tokenizer special tokens" — a startswith-BOS check would have fixed the vendor case and silently missed the presets, which need 1 -> 0, not 2 -> 1. `fallback_on_error` is keyword-only with **no default**, so none of the seven call sites could quietly inherit a different error contract, and four hand-rolled copies of the legacy fallback prompt were deleted rather than fixed a fifth time. 62 offline tests over a real fast tokenizer with a genuine BOS/EOS post-processor (30 of them red on `main`), a train/infer prefix property, and an AST ratchet with controls proving it can fail. They reported running 24 mutations; I re-ran three myself and all three were killed — the encoder reverted to pre-fix behaviour failed 23 tests. A first contribution ([#781](https://github.com/MakazhanAlpamys/Soup/issues/781), [#782](https://github.com/MakazhanAlpamys/Soup/pull/782))
@@ -550,6 +554,7 @@ Listed by first contribution. PR numbers link the work.
- `soup bench train` read the SM clock once, after training had returned. On the gate-836 box the field read mostly 180 MHz and never above 1417, against a busy median of 2370–2557 MHz, so it could not tell apart two runs whose throughput differed 1.83x. **A background sampler now reads the clock during the counted steps only, for torch's own device by PCI bus id, and never touches torch or CUDA itself.** Each sample is stamped at the midpoint of its query and cut to the collector's own post-warm-up window. `timing.step_seconds` keeps every counted step in run order, and the docs now say which failures write a report. They asked whether torch's PCI bus id matched `nvidia-smi` rather than assuming it, and on an RTX 5070 Laptop it did. The gate record gained an addendum that leaves the sampler-on/off throughput question open instead of claiming there is no overhead. Over three rounds they closed every blocking item, including two assertions they had dropped in a rewrite, and said so plainly ([#1166](https://github.com/MakazhanAlpamys/Soup/issues/1166), [#1177](https://github.com/MakazhanAlpamys/Soup/pull/1177))
- Took the first of the six saturated bundled suites in the #1192 series off the 1.000 rail: `mini_arithmetic` replaced 12 single-step rows with 16 multi-step or large-operand ones, bumped `BUNDLED_SCORER_REVISION` to 4 and explained why the fingerprint correctly did not move, and published a record that says it is not the 7B reference and that half the strong model's misses are truncation (Qwen2.5-1.5B 0.800, SmolLM2-135M 0.375). After review the test now recomputes every hard key from its own question, which closed two surviving mutations (a wrong question with its key kept); twelve mutations killed, new file fails 5 of 7 on clean main ([#1192](https://github.com/MakazhanAlpamys/Soup/issues/1192), [#1462](https://github.com/MakazhanAlpamys/Soup/pull/1462))
- `soup data augment` wrote rows with an empty rewritten field and `soup distill-prompt` dropped every failed row and wrote an empty file, both exiting 0 while every provider call failed, because neither built its provider with `raise_on_error`; they fixed the cause in both builders, counted every call, treated an empty reply as a failure, exited 1 without a file when nothing was usable and reported the failure count on a partial run, and replaced the five tests that had encoded the defect with ones asserting the raised error and the exact count. After review they escaped provider error text before Rich prints it (an error containing `[/x]` crashed the command, after the file was written on the partial path), tightened five `!= 0` assertions to `== 1`, and covered translate, style and all three escape sites. 16 of 18 new tests fail on clean main, fifteen mutations killed ([#1274](https://github.com/MakazhanAlpamys/Soup/issues/1274), [#1463](https://github.com/MakazhanAlpamys/Soup/pull/1463))
+ - `mini_common_sense` scored 1.000 on the strong reference, so the forgetting gate could not see a regression on it, and 14 of its 24 keys were B. They grew the fixture to 40 rows from a measured candidate pool, rebalanced the key so no letter exceeds 30%, bumped the scorer revision with the fingerprint reasoning written next to it, and recorded the headroom and the chance level in a benchmark record. **When review showed that five key and wording mutations left every test green, they added the two tests that pin each key to its option text and each hard stem to its question, verbatim and in one push**; all five mutations fail now, reverting the fixture fails 8 tests, and 861 pass around the gate ([#1192](https://github.com/MakazhanAlpamys/Soup/issues/1192), [#1673](https://github.com/MakazhanAlpamys/Soup/pull/1673))
- **Aditya Pratap Singh** ([@akkupratap323](https://github.com/akkupratap323))
- Closed a silent pass in the PR gate `soup ci init` writes: `soup data validate` exited 0 at "0/5 rows valid", so a dataset the loader would drop entirely sailed through CI. Zero usable rows now fails with exit 2 and a reason, while a partial drop still passes as it did — **the change is exactly as narrow as the issue asked**, and it reuses the pass-0 / failed-gate-2 / input-error-1 shape `soup ship` and `soup data lint` already use rather than adding a sixth convention. An opt-in `--min-valid-fraction` adds a stricter gate, with the equal-to-threshold case pinned by a test. Every test kills its mutation, including over-broadening to "any dropped row", which fails four tests. A first contribution ([#811](https://github.com/MakazhanAlpamys/Soup/issues/811), [#858](https://github.com/MakazhanAlpamys/Soup/pull/858))
@@ -826,6 +831,12 @@ Listed by first contribution. PR numbers link the work.
- 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))
- First contribution: `soup ab` stayed at `continue` after a saturated warm-up while the accept hold (#1419) was the only thing holding the verdict back, and kept advising more samples that provably could not release it. They took points 1 and 2 of the issue, added `accept_held`, the two spreads and the real held-out row count to the verdict, and made the panel name the ratio and what to do. **Review found that the four extra webhook keys could only ever be false and that the wording still described a retired accept boundary in the docs, the gate record, three code comments and the test premise; they dropped the keys, put a negative assertion on the payload, rewrote every site, and pinned the panel details we named so that each mutation of them now fails a test.** 19 tests (17 fail on `main`), 18 of 18 mutations killed ([#1524](https://github.com/MakazhanAlpamys/Soup/issues/1524), [#1585](https://github.com/MakazhanAlpamys/Soup/pull/1585))
+- **Geovana G. Grigorio** ([@geoggrigori](https://github.com/geoggrigori))
+ - First contribution: the docs claimed an 8B base fits a 4 GB card with 4-bit layer streaming without saying at what shape, while `data.max_length` defaults to 2048. They put the measured shape next to the claim (batch 1, 512 tokens per step, about 1 GB per further 512 tokens on a 128k-vocabulary model) and added the Llama-3.1-8B NF4 figure from probe v0.73.0 section 9 to "Sizing a streaming run", with the note that the default `max_length` must come down to 512 for that setup. Docs only; every number and anchor re-checked against the probe record and the schema ([#1695](https://github.com/MakazhanAlpamys/Soup/issues/1695), [#1719](https://github.com/MakazhanAlpamys/Soup/pull/1719))
+
+- **Hitesh_G** ([@Hitesh-XS](https://github.com/Hitesh-XS))
+ - First contribution: `soup diagnose` read an answer in Lao, Khmer, Myanmar, halfwidth katakana or a CJK Extension C+ block as a single token and scored a symbol-only answer against a hard-coded placeholder, so the memorization and mode-collapse probes were blind in those scripts. They widened the no-space ranges so these scripts are scored per character pair like Thai, made symbol-only answers compare by their symbol and punctuation characters, and kept rows or answer sets with no tokens out of the scores instead of letting them dilute the mean. **Across three review rounds they closed every point, the last one (a mark such as U+FE0F dropped from the symbol fallback) in a single push with the tests verbatim**; five mutations each fail a named test, 25 tests on the PR and 2,997 around it pass ([#1343](https://github.com/MakazhanAlpamys/Soup/issues/1343), [#1559](https://github.com/MakazhanAlpamys/Soup/pull/1559))
+
---
Want to join this list? See [CONTRIBUTING.md](CONTRIBUTING.md) — good first issues are