From e4fe1cfbfb697b49a75b0c2727d55c232fd91544 Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:09:41 -0500 Subject: [PATCH] QuantState.to(): move code tensor with others to correct device, fixes #1527 (#1528) --- bitsandbytes/functional.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitsandbytes/functional.py b/bitsandbytes/functional.py index 595f824ba..26a056502 100644 --- a/bitsandbytes/functional.py +++ b/bitsandbytes/functional.py @@ -821,6 +821,7 @@ def as_dict(self, packed=False): def to(self, device): # make sure the quantization state is on the right device + self.code = self.code.to(device) self.absmax = self.absmax.to(device) if self.nested: self.offset = self.offset.to(device)