Skip to content
Merged
Changes from all commits
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
7 changes: 3 additions & 4 deletions bitsandbytes/nn/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,10 @@ def to(self, *args, **kwargs):
)

# If we had already quantized, move the statistics appropriately.
if is_quantized and device is not None:
if self.CB is not None:
new_param.CB = new_param.data
if is_quantized:
new_param.CB = new_param.data

if self.SCB is not None:
if self.SCB is not None and device is not None:
new_param.SCB = self.SCB.to(device)

return new_param
Expand Down