convert : remove redundant code (#15708)

Signed-off-by: Jie Fu <jiefu@tencent.com>
This commit is contained in:
Jie Fu (傅杰)
2025-09-01 23:53:31 +08:00
committed by GitHub
parent 02c1813517
commit 4b20d8b7e3

View File

@@ -302,10 +302,6 @@ class ModelBase:
# data = data_torch.squeeze().numpy()
data = data_torch.numpy()
# if data ends up empty, it means data_torch was a scalar tensor -> restore
if len(data.shape) == 0:
data = data_torch.numpy()
n_dims = len(data.shape)
data_qtype: gguf.GGMLQuantizationType | bool = self.tensor_force_quant(name, new_name, bid, n_dims)