From 39102df73ff6204e0c6e6d4b1a15399a15cbd0e4 Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:14:54 +0100 Subject: [PATCH] Stop custom tensor class propagating past dequant #163 --- ops.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ops.py b/ops.py index 2b9be44..cea313e 100644 --- a/ops.py +++ b/ops.py @@ -117,6 +117,7 @@ class GGMLLayer(torch.nn.Module): # dequantize tensor while patches load weight = dequantize_tensor(tensor, dtype, self.dequant_dtype) + weight.__class__ = torch.Tensor # prevent propagating custom tensor class # apply patches if patch_list: