Skip to content

Commit

Permalink
removed verbose statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun Gumma committed Dec 3, 2024
1 parent f114413 commit 4170ee0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fairseq_cli/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
def mark_only_lora_as_trainable(model, bias="none") -> None:
for n, p in model.named_parameters():
p.requires_grad = "lora_" in n
logger.info(f"Setting {n} to {'trainable' if p.requires_grad else 'frozen'}")
# logger.info(f"Setting {n} to {'trainable' if p.requires_grad else 'frozen'}")
if bias == "none":
return
elif bias == "all":
Expand Down Expand Up @@ -96,7 +96,7 @@ def replace_with_lora(
if module.bias is not None:
new_module.bias.data = module.bias.data

logger.info(f"Replacing {full_module_name} with LoRALinear")
# logger.info(f"Replacing {full_module_name} with LoRALinear")
setattr(model, name, new_module)

elif isinstance(module, torch.nn.Embedding) and any(
Expand All @@ -117,7 +117,7 @@ def replace_with_lora(
with torch.no_grad():
new_module.weight.data = module.weight.data

logger.info(f" | > Replacing {full_module_name} with LoRAEmbedding")
# logger.info(f" | > Replacing {full_module_name} with LoRAEmbedding")
setattr(model, name, new_module)

else:
Expand Down

0 comments on commit 4170ee0

Please sign in to comment.