From 93f7f7aef712f9247a16c277ee55aa24121d3e24 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:34:35 +0300 Subject: [PATCH] gguf : write tensors one by one and code reuse --- gguf.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gguf.py b/gguf.py index ac376606f..c5a8f5b90 100644 --- a/gguf.py +++ b/gguf.py @@ -61,7 +61,6 @@ class GGUFWriter: def __init__(self, fout: IO): self.fout = fout self.offset_tensor = 0 - self.tensors: List[np.ndarray] = [] def write_header(self, tensor_count: int, metadata_kv_count: int): self.fout.write(struct.pack("