From ea5f9ad2ca4311dcad93f43bd020a88a72fc0cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Yusuf=20Sar=C4=B1g=C3=B6z?= Date: Sat, 29 Jul 2023 12:25:43 +0300 Subject: [PATCH] gguf : fix writing gguf arrays --- gguf.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gguf.py b/gguf.py index 25d99ae93..ac376606f 100644 --- a/gguf.py +++ b/gguf.py @@ -122,11 +122,12 @@ class GGUFWriter: self.write_key(key) self.write_val(val, GGUFValueType.ARRAY) - def write_val(self: str, val: Any, vtype: GGUFValueType = None): + def write_val(self: str, val: Any, vtype: GGUFValueType = None, write_vtype: bool = True): if vtype is None: vtype = GGUFValueType.get_type(val) - self.fout.write(struct.pack("