Repository navigation
apr finetune and LoRA adapters: correct loading, merging and CUDA training #5341
Description
Scope: Adapter handling in aprender-train: PEFT tensors read as f32 without a dtype check, merges that are wrong on partial matches or a missing lora_alpha, adapters that fail to load with only a warning, the hybrid GDN (Qwen3.5) architecture refused until modelled, LoRA training on CUDA, and the complexity debt in the CUDA instruct path.
Why it matters: A fine-tune that silently loads or merges the wrong weights produces a model that looks trained and is not.
Done when: apr finetune trains a LoRA on CUDA for Qwen3.5, the merged model matches the PEFT reference within tolerance for bf16/f16/f32 adapters, and any adapter that cannot be read is a hard error.
Epic: #4000. Folded under triage rule 7b (2026-10-14): each row below was its own issue, closed as not planned and kept here as a sub-ticket. Reopen an issue when its work starts or its PR opens.
Sub-tickets
- T1-R1: aprender-train refuses hybrid/GDN (qwen3.5) arch until modelled; fix qwen3_5 head_dim override #4552 T1-R1: aprender-train refuses hybrid/GDN (qwen3.5) arch until modelled; fix qwen3_5 head_dim override (milestone 0.72.0); branch
la-72/4552-train-arch-honesty- accept: the outcome in the title, with a receipt
- 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: a PEFT adapter, a partial match or a missing lora_alpha gives a wrong merge with exit 0 (milestone 0.72.0)
- accept: Done when:
- aprender-train: load_adapter_peft reads every tensor as f32 with no dtype check (bf16/f16 adapters load as half-length tensors, in HashMap order) #4697 aprender-train: load_adapter_peft reads every tensor as f32 with no dtype check (bf16/f16 adapters load as half-length tensors, in HashMap order) (milestone 0.72.0); branch
fix/4697-peft-adapter-dtype- accept: the outcome in the title, with a receipt
- aprender-train: InstructPipeline::from_pretrained only warns when the adapter cannot be read, then trains fresh adapters #4698 aprender-train: InstructPipeline::from_pretrained only warns when the adapter cannot be read, then trains fresh adapters (milestone 0.72.0); branch
la-72/4698-adapter-read-refuses— reopened 2026-10-14 as a 0.72.0 floor row; tracked on its own ticket, not here- accept: the outcome in the title, with a receipt
- aprender-train: pay down instruct try_init_cuda (CC 17 / cog 41) and cuda_train_step (18/40), prerequisite of R15a C2b/C3 #4699 aprender-train: pay down instruct try_init_cuda (CC 17 / cog 41) and cuda_train_step (18/40), prerequisite of R15a C2b/C3 (milestone 0.72.0)
- accept: the outcome in the title, with a receipt
- aprender-train: R15a - apr finetune LoRA trains on CUDA: one lora_backward, targets from LoRAConfig, every adapter moves, base frozen (cells C1-C4) #4761 aprender-train: R15a - apr finetune LoRA trains on CUDA: one lora_backward, targets from LoRAConfig, every adapter moves, base frozen (cells C1-C4) (milestone 0.72.0)
- accept: Acceptance
Activity
fix(apr-cli): merge refuses infixed PEFT leftovers, orphan halves and…
noahgift commentedon Oct 15, 2026
Folded in (cop batch 10:31Z): #4698 — each is now a checklist row of this master.
noahgift commentedon Oct 22, 2026
Tracked in #4000 (triage 2026-10-22).
noahgift commentedon Oct 22, 2026
tracked in #4000