From c25052b72e6a3bba87ae9d392410232c26b22c5f Mon Sep 17 00:00:00 2001 From: Riceball LEE Date: Fri, 26 Jan 2024 15:48:19 +0800 Subject: [PATCH] fix(gguf_reader): the "general.alignment" should be UINT32 type --- gguf-py/gguf/gguf_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gguf-py/gguf/gguf_reader.py b/gguf-py/gguf/gguf_reader.py index 8682765ed..5b6d4ba6b 100644 --- a/gguf-py/gguf/gguf_reader.py +++ b/gguf-py/gguf/gguf_reader.py @@ -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