]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
py : fix wrong input type for raw_dtype in ggml to gguf scripts (#8928)
authorFarbod Bijary <redacted>
Fri, 16 Aug 2024 10:36:30 +0000 (14:06 +0330)
committerGitHub <redacted>
Fri, 16 Aug 2024 10:36:30 +0000 (13:36 +0300)
Co-authored-by: farbod <redacted>
convert_llama_ggml_to_gguf.py

index 7b00b4398178b629d62be86c9d8706c1a7023423..29b14e98dd237a4c04e139cc6e35d9494576a896 100755 (executable)
@@ -116,7 +116,7 @@ class Tensor:
         assert quant is not None, 'Unknown tensor type'
         (blksize, tysize) = quant
         offset += 12
-        self.dtype= dtype
+        self.dtype= gguf.GGMLQuantizationType(dtype)
         self.dims = struct.unpack(f'<{n_dims}I', data[offset:offset + (4 * n_dims)])
         offset += 4 * n_dims
         self.name = bytes(data[offset:offset + name_len])