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): #2042, #1920 [skip ci]

Alpamys51391b81e57b
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 4a5b4ef4..581c7d32 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -143,6 +143,7 @@ Listed by first contribution. PR numbers link the work.
- The QuEST route accepted `training.auto_mixed_precision`, which can switch its fake-quant arithmetic to FP16 from nothing more than a substring of the base name, a precision the #674 gate never measured. **It is now refused at config load, naming both fields**, while a QuEST config without the key still loads. They took the first refusal the same evening, counted the shipped configs affected (none), and pinned the guard so that moving or widening it turns a test red; 6 of 6 mutations fail a test ([#1245](https://github.com/MakazhanAlpamys/Soup/issues/1245), [#1252](https://github.com/MakazhanAlpamys/Soup/pull/1252))
- Took both optional points from the #1252 review about twenty minutes after they were raised. With more than one invalid QuEST setting, the task, backend or modality error is now reported before the auto mixed-precision refusal, and the Auto Mixed-Precision guide links to the QuEST evidence boundary. **The test pins the guard's position, not just its presence**: moving it back to the top fails 3 tests, and moving it only partway fails 2 or 1; 5 of 5 mutations fail a test ([#1252](https://github.com/MakazhanAlpamys/Soup/pull/1252), [#1276](https://github.com/MakazhanAlpamys/Soup/pull/1276))
- Continuing from a local QuEST artifact quietly recalibrated its activation clips on the first 32 new rows. They made the warm start restore the stored calibration under the artifact loader's rule (the `config.json` declaration must equal the sidecar) and added two checks of their own: the base must not change while loading, and a non-local artifact is refused. They published the best post-fit checkpoint as a record that leads with the still-failing gate (ratio 1.038367, gap +0.0785 nat [+0.0715, +0.0860]), keeps nine negative or inconclusive follow-ups, and ships a verifier that reproduces its numbers exactly. All three review items were closed within half an hour. The new tests fail on `main` (6 of 6), and every non-equivalent mutation of the continuation branch tried over two review rounds now fails a test ([#674](https://github.com/MakazhanAlpamys/Soup/issues/674), [#1624](https://github.com/MakazhanAlpamys/Soup/pull/1624))
+ - Published the #674 development follow-ups with the failed gates in front, again: W4A16 reconstruction closest at response-NLL ratios of 1.016327 and 1.016500 on DEV2048 (zero-margin parity still fails), the native strict W4A4 and mixed-route results, a transfer experiment that regressed on DEV704, and the failure to reproduce the older legacy FP losses exactly, recorded as a failure rather than replaced. **The half worth copying is the evidence file**: 642 aggregate contrasts from five audited studies, source hashes, and the SHA-256 printed in the record, so every ratio and pass count can be recomputed from the JSON, which it was at review (39 table cells to nine decimals, 2/6, 18/18, 6/12 and 6/18, every parity family failing), while the record states plainly that the PR alone does not reproduce the training. It asks the acceptance question instead of answering it ([#674](https://github.com/MakazhanAlpamys/Soup/issues/674), [#2042](https://github.com/MakazhanAlpamys/Soup/pull/2042))
- **Achuth Reddy Bangaru** ([@AchuthReddy-16](https://github.com/AchuthReddy-16))
- `soup train --no-reexec` printed a launch command with the user's own flags dropped, so following it trained without `--fsdp` while still succeeding. Rather than patch the printed copy, they deleted it and derived the hint from the argv that actually launches the run — then, asked for a guard, wrote one whose exclusion set forces a *decision* for every new `soup train` flag instead of letting silence make it ([#415](https://github.com/MakazhanAlpamys/Soup/pull/415))
- A tokenizer output that is dict-LIKE but not a registered `Mapping` was read as a sequence, so its KEYS became tokens and the error named `input_ids[0]='input_ids'` — pointing the reader at their data when the cause was the type check. They went past the reported instance to the second, quieter one: the same gate at `_apply_template_with_mask` does not raise, it silently drops `assistant_masks` and trains unmasked, so widening only the loud gate would have left the worse half in place. Also renamed the helper `data_doctor` had been importing across module boundaries under a private name ([#447](https://github.com/MakazhanAlpamys/Soup/pull/447))
@@ -316,6 +317,7 @@ Listed by first contribution. PR numbers link the work.
- Took item 2 of the 2026-10-05 scope of #797 (the issue stays open): `training.gradient_checkpointing` never reached the TRL/HF arguments of seven wrappers, so on unquantized runs `false` lost to TRL's default `true` in GRPO, IPO, BCO, reward-model and online-DPO, and `true` lost to HF's default `false` in pretrain and embedding. They claimed the item on the issue first, reused the existing `should_enable_hf_gradient_checkpointing` at all seven sites, and kept the enabled tiers as full checkpointing, where these wrappers have no selective hooks. **The part worth copying is the test**: it builds the seven real wrappers on a tiny local Llama, pins HF to CPU, and checks both the argument and `model.is_gradient_checkpointing` after a real one-step training run, so a mock cannot pass it. Review asked for a renamed fragment and for a layer-streaming sentence to go (`stream_layers` is accepted only for sft, dpo, orpo, simpo and kto), and both were done in one push. In review, inverting the value at each site fails 8 of the 56 tests and deleting it fails 2 (TRL tasks) or 6 (pretrain, embedding) ([#797](https://github.com/MakazhanAlpamys/Soup/issues/797), [#1778](https://github.com/MakazhanAlpamys/Soup/pull/1778))
- Closed #1758, reported by @abdulwaarith0: `utils/live_eval` had no public way to pass chat-template options or to render and encode a prompt as `make_generator` does, so callers patched private names and a generation could change without any error. They made `encode_prompt` and `MAX_PROMPT_TOKENS` public, routed both generators through that one helper, added `chat_template_kwargs` to both and `soup ship --chat-template-kwargs`, and documented `loaded=(model, tokenizer, device)` reuse and caller-managed batch padding. **The part worth copying is how the review gap closed**: the refusal test pinned 3 of the 9 reserved names, so six removals and a shallow copy of the options kept the suite green; the next push parametrized the refusal over the whole set (now 11, with `chat_template` and `return_assistant_tokens_mask` added), pinned a nested value through a template that reads `settings.flags.enable_thinking`, kept the underlying render error in the message and added the `RecursionError` catch the review had marked optional. In a fresh run each of the 11 names removed one at a time fails its own case, a shallow copy fails 3 tests and 35 of 36 mutations are caught; the survivor is the `isinstance(prompt, str)` guard in the public `encode_prompt`. They say plainly that the end-to-end test is a tiny randomly initialized Llama on CPU, with no CUDA or pretrained-quality claim ([#1758](https://github.com/MakazhanAlpamys/Soup/issues/1758), [#1776](https://github.com/MakazhanAlpamys/Soup/pull/1776))
- Closed #1760 (reported by abdulwaarith0): a GGUF export printed nothing while it converted and could not skip the pip step for the convert dependencies. `soup export --format gguf` now reports its phases, `--verbose` streams the converter and quantizer output with the failure summary kept (bounded tail, child terminated and reaped on an output error), and `--no-install-deps` names missing `gguf` / `sentencepiece` / `protobuf` before any merge or toolchain work without calling pip. **The part worth copying is how they closed review findings with tests that fail for the right reason**: the dropped verbose forwarding on the direct f16/f32 convert call is pinned by eight cases, the `protobuf` probe by a test that fails when its module name is renamed, when presence ignores it or when the probe is dropped, and the phase-line assertions went through the ANSI-strip helper so they hold under `FORCE_COLOR=1`. The PR says plainly that no real llama.cpp conversion was run ([#1760](https://github.com/MakazhanAlpamys/Soup/issues/1760), [#1777](https://github.com/MakazhanAlpamys/Soup/pull/1777))
+ - Added native DoRA to MLX text SFT, which `backend: mlx` had refused: mlx-lm's DoRA layers on dense unquantized and pre-quantized 4-bit targets, `fine_tune_type: dora` written by both metadata sites so the adapter reloads and fuses natively, unsupported targets refused before any layer is converted, and a warm start that refuses an adapter with missing, extra or reshaped tensors before loading any of them. **Review of the first round asked for a test of the `task == "sft"` condition, and the new test pins the DoRA-specific message (grpo and pretrain), because the general MLX task validator would otherwise hide a removed condition.** `tests/test_mlx_dora.py` passes 14 (8 fail on the merge-base), 7 validator mutations and the `fine_tune_type` site are each caught, and the MLX-only lines run in the `mlx-smoke` job ([#1918](https://github.com/MakazhanAlpamys/Soup/issues/1918), [#1920](https://github.com/MakazhanAlpamys/Soup/pull/1920))
- **Srinivasan R** ([@Srinivasan8888](https://github.com/Srinivasan8888))
- Connected recorded thumbs feedback to loop harvesting ([#1440](https://github.com/MakazhanAlpamys/Soup/issues/1440), [#1832](https://github.com/MakazhanAlpamys/Soup/pull/1832)).