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): #1891, #2043 [skip ci]
Alpamys3b6c3fb34f47
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 0ac80695..4a5b4ef4 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -900,6 +900,7 @@ Listed by first contribution. PR numbers link the work.- Closed #1768, reported by @bobbonauta: a resumed `dpo`, `ipo` or `grpo` run restored the optimizer and the step counter but trained a freshly initialised adapter, because TRL adds a frozen `ref` adapter beside the trained `default` one and `Trainer._load_from_checkpoint`, finding an adapter subfolder (`ref/`), never reads the adapter at the checkpoint root. They claimed the issue with a CPU reproduction on a tiny Llama, measured every task that hands a `PeftModel` to TRL (dpo, ipo, `preference` with either loss and grpo are affected; `grpo_beta: 0`, orpo, simpo, bco, kto, sft and reward_model are not), and added `reload_root_adapter_on_resume`, installed in the three wrappers before the dtype restore of #1660. **The part worth copying is the premise test**: one test runs PEFT and the real `Trainer._load_from_checkpoint` without TRL and asserts that the Trainer alone leaves `default` new, with a failure message that says to remove the helper when transformers starts reading the root itself. They report 27 mutations that all fail a test, two surviving conditions removed from the code, and what they could not run (any GPU, `online_dpo`, unsloth, `stream_layers`). A review round on `718e5aed` got 11 of 11 mutations failing a named test and 176 passed with 1 skipped over the four related files ([#1768](https://github.com/MakazhanAlpamys/Soup/issues/1768), [#1797](https://github.com/MakazhanAlpamys/Soup/pull/1797))- Closed #1425 with its last half: a `preference_loss_weights` blend with a `simpo` or `orpo` primary and a `dpo` or `ipo` term stopped at the first step, because trl's CPO and ORPO trainers run no frozen reference. They made the blend build the reference from the trainer's own forward with the LoRA adapter switched off (no private trl toggle, PEFT's `requires_grad` flags saved and restored even when the forward raises, no extra forward for a blend without `dpo` or `ipo`). **The part worth copying is what they did when review showed the reference could be wrong**: with `pissa`, `olora`, `loftq`, `use_olora` or `relora_steps` the adapter-off model is not the starting model (policy minus reference was 0.08 at step 0 instead of 0), so the term would have trained against another model without an error; they measured it, refused that combination before the model loads with the reason and the way out, and after a second review pinned that the guard follows the largest weight and not the first key of the blend, in the guard and in the trainer build. The PR says plainly that `loftq` was not measured ([#1425](https://github.com/MakazhanAlpamys/Soup/issues/1425), [#1828](https://github.com/MakazhanAlpamys/Soup/pull/1828))- Added the default-off `training.fast_lora` switch and compatibility validators for Transformers text SFT with zero LoRA dropout, wiring the existing q/k/v, SwiGLU MLP and single-projection kernels into resident and streamed setup. They added per-kernel counts, patch rollback when no supported module can run, streamed-runtime cleanup on patch failure, float64 CPU gradchecks and float32 forward/backward and streamed parity coverage. CUDA validation, speedup and model-quality claims remain outside the evidence ([#792](https://github.com/MakazhanAlpamys/Soup/issues/792), [#1973](https://github.com/MakazhanAlpamys/Soup/pull/1973)).+ - Closed #1835, their own report: `training.relora_steps` loaded for `dpo`, `ipo`, `kto`, `bco`, `grpo` and a preference blend naming `dpo`, `ipo` or `bco`, although a ReLoRA restart merges the adapter into the base weights trl reads its frozen reference from, so from the first restart on the reference was the policy as of that step with no error. They measured the reference on a fixed batch for five tasks first (unchanged until the restart, 0.83 at it for `dpo`), made `SoupConfig` refuse the combination with the setting, the reason and the blend remedy, kept `sft`, `orpo`, `simpo` and `grpo_beta: 0`, and took the review on `ppo`, the message and the docs in one commit. 31 new tests, 22 fail without the fix, 41 mutations with 40 killed and one equivalent survivor ([#1835](https://github.com/MakazhanAlpamys/Soup/issues/1835), [#1891](https://github.com/MakazhanAlpamys/Soup/pull/1891))- **Nariman Abdikarim** ([@Nari-Ab](https://github.com/Nari-Ab))- Sanitized model and dataset paths across CLI display sinks and both short-name branches, with 17 portable regressions covering refusals, adapter loading, saved outputs and real Elo/leaderboard table consumers. Independent maintainer validation passed all 17 cases before and after five source undos that caused 1/1/1/3/4 failures; all eight required hosted checks passed ([#1864](https://github.com/MakazhanAlpamys/Soup/issues/1864), [#1868](https://github.com/MakazhanAlpamys/Soup/pull/1868))@@ -967,6 +968,7 @@ Listed by first contribution. PR numbers link the work.- **Vincent Le** ([@VincentTLe](https://github.com/VincentTLe))- First merged contribution. Made the checkpointing choice explicit in all 30 affected shipped TRL-family recipes, templates and examples, with 22 matching snapshots. The config walker catches deleting only the reward-example key even though that config still loads, preserving the memory behavior intended before the TRL forwarding fix ([#1862](https://github.com/MakazhanAlpamys/Soup/issues/1862), [#1923](https://github.com/MakazhanAlpamys/Soup/pull/1923))+ - Follow-up to #1923: pinned `TRL_TASKS` in the shipped-config gradient-checkpointing test, so a task dropped from the constant fails instead of shrinking the walk; dropping `online_dpo` fails 1 of 81 ([#2043](https://github.com/MakazhanAlpamys/Soup/pull/2043))- **Abhishek Jha** ([@SpinachDigital](https://github.com/SpinachDigital))- Made `training.gradient_checkpointing: false`, including the schema default, reach all eleven Unsloth trainer setup paths instead of silently enabling checkpointing. Preserved explicit enabled settings, documented the possible activation-memory increase and workload-dependent performance, and pinned real-config forwarding with mocked-loader controls ([#797](https://github.com/MakazhanAlpamys/Soup/issues/797), [#1981](https://github.com/MakazhanAlpamys/Soup/pull/1981)).