Read more GGUF metadata (scale_linear and freq_base) (#3877)

This commit is contained in:
Gennadij 2023-09-12 23:02:42 +03:00 committed by GitHub
parent 90fca6a77d
commit 460c40d8ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -70,6 +70,9 @@ def load_metadata(fname):
GGUF_VERSION = struct.unpack("<I", file.read(4))[0]
ti_data_count = struct.unpack("<Q", file.read(8))[0]
kv_data_count = struct.unpack("<Q", file.read(8))[0]
if GGUF_VERSION == 1:
raise Exception('You are using an outdated GGUF, please download a new one.')
for i in range(kv_data_count):
key_length = struct.unpack("<Q", file.read(8))[0]