fix(gguf_reader): the "general.alignment" should be UINT32 type

This commit is contained in:
Riceball LEE 2024-01-26 15:48:19 +08:00
parent 1182cf4d4f
commit c25052b72e
No known key found for this signature in database
GPG key ID: 10F15E84852CB868

View 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