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
[BUG] DoRA adapters (use_dora: true) load without error but run as plain LoRA; other unsupported PEFT fields are silently accepted #4211
Severity: medium (silently wrong output) Version: 7.11.0 @ 9dad249. #4002 (closed) listed this as plausible; it reproduces at HEAD.
Summary
adapter/peft.py:366 checks if self.use_dora and self.megatron_config: raise, so DoRA is rejected only when Megatron is also set.
peft.py:417-418 (from_pretrained) silently drops keys it doesn't know, e.g. newer-PEFT use_qalora, alora_invocation_tokens, target_parameters.
adapter/adapter.py:282-294 reads only lora_A / lora_B. lora_magnitude_vector, trained biases (bias != "none") and modules_to_save tensors are ignored.
Reproduce
Take any LoRA adapter, e.g. sliuau/llama-3.2-3b_4bits_128group_size_eora_rank64_mmlu_c4.
Set "use_dora": true in adapter_config.json.
Add ...lora_magnitude_vector tensors to adapter_model.safetensors.
Load it:
GPTQModel.load("sliuau/Llama-3.2-3B_4bits_128group_size", adapter=Lora(path=dora_dir, rank=64),
backend=BACKEND.GPTQ_TORCH, device="cuda:0")
# loads fine; 196 modules get a plain LoRA adapter; magnitude vectors are never read
Expected
Raise ValueError("DoRA is not supported") whenever use_dora is set, as is already done for LoftQ, EVA and lora_bias.
Raise or warn for unknown config keys, bias != "none" and non-empty modules_to_save.
Found during an AI-assisted review (Claude Code) of 9dad249; repros were run on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Activity
fix: reject DoRA and other unsupported PEFT adapter features (#4211) (#…