Skip to content

Commit

Permalink
add dora condition for �dd_adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-fong committed Feb 4, 2025
1 parent d6d1dab commit 7a68d71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/adapters/methods/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@ def add_adapter(self, adapter_name: str, layer_idx: int) -> bool:
)
if lora_config is not None and self._check_lora_location(lora_config):
if lora_config.composition_mode == "add":
lora_cls = DoRA
lora_cls = LoRA
elif lora_config.composition_mode == "scale":
lora_cls = IA3
elif lora_config.composition_mode == "dora":
lora_cls = DoRA
else:
raise ValueError(f"Unknown composition_mode: {lora_config.composition_mode}")
lora = lora_cls(
Expand Down

0 comments on commit 7a68d71

Please sign in to comment.