Skip to content

[BUG] DoRA adapters (use_dora: true) load without error but run as plain LoRA; other unsupported PEFT fields are silently accepted #4211

Closed

Description

@Qubitium

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

  1. Take any LoRA adapter, e.g. sliuau/llama-3.2-3b_4bits_128group_size_eora_rank64_mmlu_c4.
  2. Set "use_dora": true in adapter_config.json.
  3. Add ...lora_magnitude_vector tensors to adapter_model.safetensors.
  4. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions