Skip to content

Commit a0f112a

Browse files
Update src/megatron/bridge/peft/canonical_lora.py
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Signed-off-by: Chen Cui <cxcui@alumni.cmu.edu>
1 parent 0e80f9a commit a0f112a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/megatron/bridge/peft/canonical_lora.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _init_target_match_state(self) -> None:
277277
self._alias_to_pattern.clear()
278278
self._alias_matches.clear()
279279

280-
for target in self.target_modules:
280+
for target in self.target_modules or []:
281281
assert not target.endswith("linear_qkv"), (
282282
"Canonical LoRA does not support target 'linear_qkv'. Either use 'linear_qkv' with LoRA() or "
283283
"use ['linear_q', 'linear_k', 'linear_v'] with Canonical LoRA"

0 commit comments

Comments
 (0)