From b601979ad8b7d4bd5981abcbcfa65b7e519df4ce Mon Sep 17 00:00:00 2001 From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com> Date: Thu, 7 Dec 2023 23:38:29 -0800 Subject: [PATCH] Revert "Merge PR#867 from jph00/patch-2" due to failing PEFT integration tests. This reverts commit 2ee289fb2f0c4f8e02c974be4a46377a5e94bddf, reversing changes made to 744d36f7b0f42861bb90a698faf4431987af3b23. --- bitsandbytes/nn/modules.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/bitsandbytes/nn/modules.py b/bitsandbytes/nn/modules.py index f42c2085b..ddc40cfa6 100644 --- a/bitsandbytes/nn/modules.py +++ b/bitsandbytes/nn/modules.py @@ -165,8 +165,6 @@ def from_prequantized(cls, data: torch.Tensor, quantized_stats: Dict[str, Any], return self def cuda(self, device): - if self.quant_state is not None: - return self w = self.data.contiguous().half().cuda(device) w_4bit, quant_state = bnb.functional.quantize_4bit(w, blocksize=self.blocksize, compress_statistics=self.compress_statistics, quant_type=self.quant_type) self.data = w_4bit