summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2024-03-14 13:32:14 +0200
committerGeorgi Gerganov <ggerganov@gmail.com>2024-03-14 13:32:14 +0200
commit77178eedc83d49f31bf757d8e12315d76460be78 (patch)
treea98e538ff3c1abb6452ef82b9a656085b26eb9fc
parent15a333260ab637a040ed0864c206a2ceaf806bb8 (diff)
gguf-py : fix dtype check (#6045)
-rw-r--r--gguf-py/gguf/gguf_writer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gguf-py/gguf/gguf_writer.py b/gguf-py/gguf/gguf_writer.py
index 9c1eeac3..4d389be9 100644
--- a/gguf-py/gguf/gguf_writer.py
+++ b/gguf-py/gguf/gguf_writer.py
@@ -204,7 +204,7 @@ class GGUFWriter:
for i in range(n_dims):
self.ti_data += self._pack("Q", tensor_shape[n_dims - 1 - i])
if raw_dtype is None:
- if tensor_shape == np.float32:
+ if tensor_dtype == np.float32:
dtype = GGMLQuantizationType.F32
elif tensor_dtype == np.float16:
dtype = GGMLQuantizationType.F16