From be2a08330d7ec232d684e50ab938870d7529471e Mon Sep 17 00:00:00 2001 From: blepping <157360029+blepping@users.noreply.github.com> Date: Sun, 14 Sep 2025 15:10:50 -0600 Subject: [PATCH] Fix dequant_dtype handling (#334) * Fix dequant_dtype handling * Simplify dequant dtype selection expression --- ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ops.py b/ops.py index ff9b960..88a352e 100644 --- a/ops.py +++ b/ops.py @@ -153,7 +153,7 @@ class GGMLLayer(torch.nn.Module): # Take into account space required for dequantizing the largest tensor if self.largest_layer: shape = getattr(self.weight, "tensor_shape", self.weight.shape) - dtype = (self.dequant_dtype and self.dequant_dtype != "target") or torch.float16 + dtype = self.dequant_dtype if self.dequant_dtype and self.dequant_dtype != "target" else torch.float16 temp = torch.empty(*shape, device=torch.device("meta"), dtype=dtype) destination[prefix + "temp.weight"] = temp