From e9895d2ce933ff9cc4eedd4ec12cf265ce887926 Mon Sep 17 00:00:00 2001 From: Christian Zhou-Zheng <59622928+christianazinn@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:55:14 -0400 Subject: [PATCH] Update gguf-py/gguf/gguf_writer.py Co-authored-by: compilade --- gguf-py/gguf/gguf_writer.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gguf-py/gguf/gguf_writer.py b/gguf-py/gguf/gguf_writer.py index 13f231261917a..85a868a77ca45 100644 --- a/gguf-py/gguf/gguf_writer.py +++ b/gguf-py/gguf/gguf_writer.py @@ -358,8 +358,6 @@ def write_tensor_data(self, tensor: np.ndarray[Any, Any]) -> None: # TODO: cleaner way to get the first key first_tensor_name = [name for name, _ in zip(self.tensors[file_id].keys(), range(1))][0] ti = self.tensors[file_id].pop(first_tensor_name) - assert len(ti.shape) == len(tensor.shape) - assert all(dim1 == dim2 for dim1, dim2 in zip(ti.shape, tensor.shape)) assert ti.nbytes == tensor.nbytes self.write_padding(fout, fout.tell())