Преглед на файлове

gguf-py : fix dtype check (#6045)

Georgi Gerganov преди 1 година
родител
ревизия
77178eedc8
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      gguf-py/gguf/gguf_writer.py

+ 1 - 1
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