From 5d81a715d4a8e1e6d9dad2d978510d997d20595c Mon Sep 17 00:00:00 2001 From: klosax <131523366+klosax@users.noreply.github.com> Date: Sat, 12 Aug 2023 21:45:45 +0200 Subject: [PATCH] gguf.py : no need to convert tensors twice --- gguf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gguf.py b/gguf.py index 5eb21ee05..0854418a6 100644 --- a/gguf.py +++ b/gguf.py @@ -179,20 +179,20 @@ class GGUFWriter: def ggml_pad(x: int, n: int) -> int: return ((x + n - 1) // n) * n - def add_tensor_info(self, name: str, tensor: np.ndarray): + def add_tensor_info(self, name: str, tensor_shape: np.ndarray, tensor_dtype: np.dtype, tensor_nbytes: int): encoded_name = name.encode("utf8") self.ti_data += struct.pack("