We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 577277f commit 3055a41Copy full SHA for 3055a41
convert-hf-to-gguf.py
@@ -2482,6 +2482,10 @@ def write_tensors(self):
2482
print(f"Can not map tensor {name!r}")
2483
sys.exit()
2484
2485
+ # convert any unsupported data types to float32
2486
+ if data_torch.dtype not in (torch.float16, torch.float32):
2487
+ data_torch = data_torch.to(torch.float32)
2488
+
2489
data = data_torch.squeeze().numpy()
2490
n_dims = len(data.shape)
2491
new_dtype: type[np.floating[Any]]
0 commit comments