Skip to content

Commit 31854da

Browse files
One more time
1 parent b2a01ec commit 31854da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bitsandbytes/optim/adamw.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ def step(self, closure=None):
220220
lor_update = torch.zeros_like(
221221
grad, dtype=p.data.dtype, device=p.data.device, requires_grad=grad.requires_grad
222222
)
223-
lor_update.grad = grad
223+
p.grad = grad
224224

225225
if "state1" not in state:
226226
self.init_state(group, p, gindex, pindex)
227227

228228
self.prefetch_state(p)
229229

230230
if "rank" in group:
231-
self.update_step(group, lor_update, gindex, pindex, return_updates=lor_update)
231+
self.update_step(group, p, gindex, pindex, return_updates=lor_update)
232232

233233
# GaLore Projection Back
234234
p.data.add_(state["projector"].project_back(lor_update))

0 commit comments

Comments
 (0)