Skip to content

Commit 005a63c

Browse files
committed
fix cpu int8 CB
Signed-off-by: jiqing-feng <[email protected]>
1 parent 5bf3159 commit 005a63c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bitsandbytes/nn/modules.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,8 @@ def to(self, *args, **kwargs):
642642
if device is not None and device.type != "meta" and self.data.device.type == "cpu":
643643
if device.type != "cpu" or self.data.dtype != torch.int8:
644644
return self._quantize(device)
645-
# TODO: Need to verify if this is needed.
646-
# elif self.data.dtype == torch.int8 and device.type == "cpu":
647-
# self.CB = self.data
645+
elif self.data.dtype == torch.int8 and device.type == "cpu":
646+
self.CB = self.data
648647

649648
new_param = Int8Params(
650649
super().to(device=device, dtype=dtype, non_blocking=non_blocking),

0 commit comments

Comments
 (0)