Skip to content

Commit

Permalink
One more time
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdouglas committed Mar 19, 2024
1 parent 4fdb4d3 commit eceed12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitsandbytes/optim/adamw.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ def step(self, closure=None):
lor_update = torch.zeros_like(
grad, dtype=p.data.dtype, device=p.data.device, requires_grad=grad.requires_grad
)
lor_update.grad = grad
p.grad = grad

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

self.prefetch_state(p)

if "rank" in group:
self.update_step(group, lor_update, gindex, pindex, return_updates=lor_update)
self.update_step(group, p, gindex, pindex, return_updates=lor_update)

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

0 comments on commit eceed12

Please sign in to comment.