]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
gguf : fix "general.alignment" type in gguf_reader.py (#5136)
authorRiceball LEE <redacted>
Fri, 26 Jan 2024 09:10:28 +0000 (17:10 +0800)
committerGitHub <redacted>
Fri, 26 Jan 2024 09:10:28 +0000 (11:10 +0200)
gguf-py/gguf/gguf_reader.py

index 8682765edbac095b6f0eb11950b29dd8af1d2b6b..5b6d4ba6bcce951ff7ad19d013415508dd386705 100644 (file)
@@ -107,7 +107,7 @@ class GGUFReader:
         offs, tensors_fields = self._build_tensors_fields(offs, tensor_count)
         new_align = self.fields.get('general.alignment')
         if new_align is not None:
-            if new_align.types != [GGUFValueType.UINT64]:
+            if new_align.types != [GGUFValueType.UINT32]:
                 raise ValueError('Bad type for general.alignment field')
             self.alignment = new_align.parts[-1][0]
         padding = offs % self.alignment