You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apr finetune merge: a PEFT adapter, a partial match or a missing lora_alpha gives a wrong merge with exit 0 #4674
apr finetune merge can write a wrong merged model and still exit 0. verify_merged_runnable (line 454) checks only that the output is valid APR v2, has sound metadata and runs, so it passes each of these cases. The 0.72 look-ahead desk found this by reading the code; it has not been run yet (C277: no runs before 0.70.1 is live).
The code is the same at main 316dee2 and at the 0.70.1 release commit 04332f8 (crates/apr-cli/src/commands/finetune_display_next_validate.rs, line numbers at 04332f8):
A PEFT-named adapter matches nothing, and the output is the unchanged base. PEFT names its tensors …lora_A.weight / …lora_B.weight. The candidate names (lines 205-230) are only {base}.lora_a and lora.{layer}.{proj}.lora_a, and the zero-match refusal counts only names ending in .lora_a (line 590). A PEFT adapter therefore counts 0, is not refused, and gives the base back with exit 0.
Partial matches are written.gguf_proj_to_hf (line 192) maps only the 7 llama projections. Any other projection is skipped without a word, so the model is merged on some layers only.
A missing lora_alpha defaults to 16.0 (lines 88 and 101, in read_adapter_lora_params). That silently changes the merge scale (alpha/rank) for any adapter trained with another alpha.
Falsifier text: QQE-009 on branch la-72/r15-receipt-ext @ed73bafff8.
Done when:
each of the three cases either refuses with a non-zero exit or merges correctly;
verify_merged_runnable fails on a merge that changed no weight;
a test covers each case and turns RED when the fix is reverted.
Not in Qwen3.5 only: this is the general merge path. No work before 0.70.1 is live (C277.3).
Reported by la-0.72 (inbox 20:17Z). The lines above were checked against 04332f8 by the cop.
merged into #5314 (master ticket for epic #4000; triage rule 7b, 2026-10-14). It is a checklist row there; reopen this issue when work on it starts or its PR opens.
Moved: this sub-ticket is now a row in #5341 (apr finetune and LoRA adapters: correct loading, merging and CUDA training), split out of #5314 by theme.
Activity
noahgift commentedon Oct 14, 2026
merged into #5314 (master ticket for epic #4000; triage rule 7b, 2026-10-14). It is a checklist row there; reopen this issue when work on it starts or its PR opens.
noahgift commentedon Oct 14, 2026
Moved: this sub-ticket is now a row in #5341 (apr finetune and LoRA adapters: correct loading, merging and CUDA training), split out of #5314 by theme.
test(apr-cli): pass the #4674 adapter tensor name by value
fix(apr-cli): merge refuses infixed PEFT leftovers, orphan halves and…