Skip to content

Commit

Permalink
put lr into kwargs instead
Browse files Browse the repository at this point in the history
  • Loading branch information
kallewoof committed Jul 30, 2024
1 parent de4f83a commit a36a872
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/peft/optimizers/loraplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


def create_loraplus_optimizer(
model: PeftModel, optimizer_cls: type[Optimizer], *, loraplus_lr_ratio: float, **kwargs
model: PeftModel, optimizer_cls: type[Optimizer], *, lr: float, loraplus_lr_ratio: float, **kwargs
) -> Optimizer:
"""
Creates a LoraPlus optimizer.
Expand Down Expand Up @@ -81,7 +81,7 @@ def create_loraplus_optimizer(
else:
param_groups["groupA"][name] = param

lr = kwargs["lr"]
kwargs["lr"] = lr
loraplus_weight_decay = kwargs.pop("loraplus_weight_decay", 0.0)
loraplus_lr_embedding = kwargs.pop("loraplus_lr_embedding", 1e-6)

Expand Down

0 comments on commit a36a872

Please sign in to comment.