fix reader on linux

Signed-off-by: isotr0py <2037008807@qq.com>
This commit is contained in:
isotr0py 2024-12-04 15:25:19 +08:00
parent 810f06bd5b
commit 94d814c559

View file

@ -95,6 +95,7 @@ class GGUFReader:
offs = 0
# Check for GGUF magic
self.data.seek(offs)
if struct.unpack("<I", self.data.read(4))[0] != GGUF_MAGIC:
raise ValueError('GGUF magic invalid')
offs += 4