From 7d2589351694018da4f4b4923a3f5318cef4da23 Mon Sep 17 00:00:00 2001 From: Jack Mousseau Date: Sun, 18 Feb 2024 07:26:35 -0800 Subject: [PATCH] Match key-value pair and tensor counts with header integer width --- gguflib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gguflib.h b/gguflib.h index 8eb9eae..1119130 100644 --- a/gguflib.h +++ b/gguflib.h @@ -152,8 +152,8 @@ typedef struct { uint8_t *data; // Memory mapped data. uint64_t size; // Total file size. struct gguf_header *header; // GUFF file header info. - uint32_t left_kv; // Number of key-value pairs yet to read. - uint32_t left_tensors; // Number of tensors yet to read. + uint64_t left_kv; // Number of key-value pairs yet to read. + uint64_t left_tensors; // Number of tensors yet to read. uint64_t off; // Offset of the next item to parse. uint64_t data_off; // Offset of tensor data section. This // is only set when all the kv/tensor header