Skip to content

Commit 4b20d8b

Browse files
authored
convert : remove redundant code (ggml-org#15708)
Signed-off-by: Jie Fu <[email protected]>
1 parent 02c1813 commit 4b20d8b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

convert_hf_to_gguf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ def prepare_tensors(self):
302302
# data = data_torch.squeeze().numpy()
303303
data = data_torch.numpy()
304304

305-
# if data ends up empty, it means data_torch was a scalar tensor -> restore
306-
if len(data.shape) == 0:
307-
data = data_torch.numpy()
308-
309305
n_dims = len(data.shape)
310306
data_qtype: gguf.GGMLQuantizationType | bool = self.tensor_force_quant(name, new_name, bid, n_dims)
311307

0 commit comments

Comments
 (0)