Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
vince62s committed Nov 8, 2023
1 parent 589d4f1 commit e99e7fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion onmt/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def load_state_dict(
and checkpoint["generator"] is not None
and param_name in checkpoint["generator"].keys()
):
keyname = name + "." + param_name if "linear" in name else param_name
keyname = (
name + "." + param_name if "linear" in name else param_name
)
param.data = checkpoint["generator"][keyname]
del checkpoint["generator"][keyname]
elif strict and "lora" not in param_name:
Expand Down

0 comments on commit e99e7fc

Please sign in to comment.