mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 03:55:20 +00:00
gguf : fix "general.alignment" type in gguf_reader.py (#5136)
This commit is contained in:
@ -107,7 +107,7 @@ class GGUFReader:
|
|||||||
offs, tensors_fields = self._build_tensors_fields(offs, tensor_count)
|
offs, tensors_fields = self._build_tensors_fields(offs, tensor_count)
|
||||||
new_align = self.fields.get('general.alignment')
|
new_align = self.fields.get('general.alignment')
|
||||||
if new_align is not None:
|
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')
|
raise ValueError('Bad type for general.alignment field')
|
||||||
self.alignment = new_align.parts[-1][0]
|
self.alignment = new_align.parts[-1][0]
|
||||||
padding = offs % self.alignment
|
padding = offs % self.alignment
|
||||||
|
Reference in New Issue
Block a user