Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edenzzzz's fix for min_8bit_size functionality in Optimizer base classes #1286

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix min_8bit_size invalid bug
  • Loading branch information
Edenzzzz committed Apr 15, 2024
commit ff6c39f0f70b486ac02dceb1177e06d35b15ec3f
2 changes: 1 addition & 1 deletion bitsandbytes/optim/optimizer.py
Original file line number Diff line number Diff line change
@@ -437,7 +437,7 @@ def init_state(self, group, p, gindex, pindex):
state = self.state[p]
state["step"] = 0

if dtype == torch.float32 or (dtype == torch.uint8 and p.numel() < 4096):
if dtype == torch.float32:
state["state1"] = self.get_state_buffer(p, dtype=torch.float32)
state["state2"] = self.get_state_buffer(p, dtype=torch.float32)
elif dtype == torch.uint8: