From 38b431de232d1b736b5af19b8c7d72f7075a70bc Mon Sep 17 00:00:00 2001 From: Riceball LEE Date: Fri, 26 Jan 2024 17:10:28 +0800 Subject: [PATCH] gguf : fix "general.alignment" type in gguf_reader.py (#5136) --- 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 8682765edbac0..5b6d4ba6bcce9 100644 --- a/gguf-py/gguf/gguf_reader.py +++ b/gguf-py/gguf/gguf_reader.py @@ -107,7 +107,7 @@ def __init__(self, path: os.PathLike[str] | str, mode: Literal['r' | 'r+' | 'c'] 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