From c861e234f4aecc1b851a7bbff0cb38a74361caf8 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:49:01 +0300 Subject: [PATCH] gguf : write tensors one by one --- gguf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gguf.py b/gguf.py index de75b54d4..1888b6c2d 100644 --- a/gguf.py +++ b/gguf.py @@ -283,6 +283,7 @@ if __name__ == "__main__": tensor2 = np.ones((32,), dtype=np.float32) * 101.0 gguf_writer.write_tensor_info("tensor0", tensor1) gguf_writer.write_tensor_info("tensor1", tensor2) - gguf_writer.write_tensors() + gguf_writer.write_tensor(tensor1) + gguf_writer.write_tensor(tensor2) gguf_writer.close()