diff --git a/neural_compressor/torch/algorithms/weight_only/modules.py b/neural_compressor/torch/algorithms/weight_only/modules.py index 702a22b49ad..18cf6e46e55 100644 --- a/neural_compressor/torch/algorithms/weight_only/modules.py +++ b/neural_compressor/torch/algorithms/weight_only/modules.py @@ -303,7 +303,6 @@ def unpack_tensor_with_torch(self, packed_tensor): def pack_tensor_with_numpy(self, raw_tensor): raw_array = raw_tensor.cpu().numpy() target_len = np.ceil(raw_array.shape[1] / self.n_pack).astype(int) - torch.int32 target_dtype = torch.tensor(0, dtype=self.compression_dtype).numpy().dtype packed_array = np.zeros((raw_array.shape[0], target_len), dtype=target_dtype) mask = np.uint8(2**self.bits - 1)