Skip to content

Commit 4a05df3

Browse files
committed
Fix critical bug in PytorchLARS().step: Undefined variable
1 parent f6978ae commit 4a05df3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitsandbytes/optim/lars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def step(self, closure=None):
181181
state = self.state[p]
182182
d_p = p.grad
183183
if weight_decay != 0:
184-
d_p = d_p.add(param, alpha=weight_decay)
184+
d_p = d_p.add(p, alpha=weight_decay)
185185

186186
if momentum != 0:
187187
buf = state.get("momentum_buffer", None)

0 commit comments

Comments
 (0)