{"slug": "five-more-measured-notes-for-peft-with-runnable-checks", "title": "Five more measured notes for peft, with runnable checks", "summary": "A reproduction of five open Hugging Face PEFT issues using PEFT 0.21.3 and 0.22.0 with Transformers 5.23.0 and 5.24.0 on CPU found measurable failures, including a 0.7388 and 0.5504 max output difference when a combined LoRA/IA³ adapter covered only one source layer (#4133) and a 0.1832 logit difference when Transformers' model.load_adapter failed to restore saved DoRA magnitude vectors (#4208). Merging an embedding LoRA and saving with save_embedding_layers=\"auto\" produced a 0.0472 max logit difference after reload (#4215), while VeRA, PVeRA and RandLoRA subset adapters created after a larger sibling failed a fresh standalone reload (#4213). The author reports the five linked issues were still open as of November 23, 2026, and recommends comparing saved artifact, materialized state and fixed-input behavior in that order rather than treating a loader returning normally as proof the intended function was restored.", "body_md": "I think I was able to reproduce these:\n\nI reproduced all five Corrections Desk cases using actual PEFT/Transformers code in two small Colab CPU stacks, then tested controls for key conversion, target coverage, shared projection capacity and merged-weight saving. These are bounded runtime observations, not tests of unpublished fixes or model-quality claims.\n\n`0.21.3`, Transformers `5.23.0`.` 0.22.0`, Transformers `5.24.0`.` 3.13.18`, PyTorch `2.14.1+cpu`, Accelerate `1.16.0`, Linux CPU, fixed seeds, and locally initialized models. The PEFT and Transformers versions changed together, so this is | Issue | Result in the two tested stacks | \n|---|---|\n| [#4117, LoHa/LoKr dropout](https://github.com/huggingface/peft/issues/4117) | Training-mode non-finite forwards when the sampled keep-mask was all zero and its mean was used as a divisor. Evaluation-mode and the relevant scaling-disabled controls stayed finite. | \n| [#4133, weighted adapter targeting](https://github.com/huggingface/peft/issues/4133) | The combined LoRA/IA³ adapter covered only one source layer. With the original source order, max output differences were **0.7388 / 0.5504** . Reversing the order changed which layer survived. | \n| [#4208, DoRA magnitude loading](https://github.com/huggingface/peft/issues/4208) | `PeftModel.from_pretrained` matched the reference logits (**0** max difference); Transformers`model.load_adapter` differed by**0.1832** , with saved magnitude vectors not restored. | \n| [#4213, shared projections](https://github.com/huggingface/peft/issues/4213) | VeRA, PVeRA, and RandLoRA subset adapters created after a larger sibling failed a fresh standalone reload with saved projections. Turning projection persistence off removed the size error, **not** the output discrepancy. | \n| [#4215, merged embeddings](https://github.com/huggingface/peft/issues/4215) | Merging an embedding LoRA and then saving an adapter with `save_embedding_layers=\"auto\"` gave a**0.0472** max logit difference after reload; the unmerged and separately tested export paths preserved the reference. | \n\nFour Stack A cases required a clean replay after an optional `torchao 0.10.0` import conflict; that import error was not a PEFT result. The [Corrections Desk](https://huggingface.co/datasets/nootxlm/corrections-desk) standalone checks and these actual runtime probes provide complementary evidence.\n\nA loader returning normally, an adapter appearing as active, or `save_pretrained()` finishing is not yet proof that the *intended function* was restored. I found it useful to separate **saved artifact**, **materialized state**, and **fixed-input behavior**, in that order:\n\n```\nA non-finite training forward?\n  Inspect the actual dropout mask size, all-zero events and mean scaling. (#4117)\n\nA weighted combination gives the wrong function?\n  Compare actual source-layer membership with combined-layer membership. (#4133)\n\nAn adapter loads but changes predictions unexpectedly?\n  Compare raw trained A/B AND method-specific state (DoRA magnitude). (#4208)\n\nA subset adapter fails to reload on its own?\n  Compare saved shared A/B shapes and values with fresh allocation capacity. (#4213)\n\nOnly merge + adapter saving changes the output?\n  Distinguish unmerged adapter-only export from merged full-model export. (#4215)\n```\n\nRecord the version pair, base/config, targets, adapter name and one fixed input; compare raw and loaded keys/values before comparing outputs. If tensors match but outputs differ, check activation, merge state, inputs, dtype and backend. If tensors or target coverage already differ, defer broad benchmarking.\n\nThree extra controls were useful:\n\n`save_embedding_layers=False` is not universally lossless.\nDetails, limitations and possible regression checks are folded below.\n\nReproduction envelope and precise baseline measurements\nAs checked on November 23, 2026, the five linked issues were still open, [PR #4142](https://github.com/huggingface/peft/pull/4142) and [PR #4185](https://github.com/huggingface/peft/pull/4185) were open, while [PR #4203](https://github.com/huggingface/peft/pull/4203) was closed without merge. Those states can change.\n\nIn short, I reproduced the **five narrow behaviors** on two CPU version pairs, and found useful additional controls for the DoRA magnitude mapping, shared projection capacity, and merged embedding export. I did not test an unpublished correction patch, quantify model quality, or establish behavior across all historical checkpoints or accelerators. The malformed-checkpoint matrix specifically tested the **unmodified 0.22.0 loader** with artifacts from two versions. I hope these bounded observations are useful alongside the original runnable notes, especially for distinguishing a successful API call from a correctly restored adapter and function.", "url": "https://wpnews.pro/news/five-more-measured-notes-for-peft-with-runnable-checks", "canonical_source": "https://discuss.huggingface.co/t/five-more-measured-notes-for-peft-with-runnable-checks/192375#post_2", "published_at": "2026-11-23 04:43:25+00:00", "updated_at": "2026-11-23 04:44:02.148622+00:00", "lang": "en", "topics": ["machine-learning", "ai-research", "ai-tools", "developer-tools"], "entities": ["Hugging Face", "PEFT", "Transformers", "LoRA", "DoRA", "VeRA", "RandLoRA", "PyTorch"], "also_reported_by": [], "takeaway": "Verify adapter reloads by comparing raw and loaded keys/values before outputs: Transformers' model.load_adapter left a 0.1832 logit gap on DoRA magnitude vectors, and save_embedding_layers=\"auto\" after merging an embedding LoRA gave a 0.0472 max logit difference.", "recommendation": {"advice": "Before trusting an adapter reload, compare saved and loaded tensors, target-layer coverage and method-specific state such as DoRA magnitudes, then compare fixed-input outputs; defer broad benchmarking if tensors or target coverage already differ.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/five-more-measured-notes-for-peft-with-runnable-checks", "markdown": "https://wpnews.pro/news/five-more-measured-notes-for-peft-with-runnable-checks.md", "text": "https://wpnews.pro/news/five-more-measured-notes-for-peft-with-runnable-checks.txt", "jsonld": "https://wpnews.pro/news/five-more-measured-notes-for-peft-with-runnable-checks.jsonld"}}