Skip to content

Commit

Permalink
Update gguf-py/gguf/gguf_writer.py
Browse files Browse the repository at this point in the history
Co-authored-by: compilade <[email protected]>
  • Loading branch information
christianazinn and compilade authored Jun 10, 2024
1 parent 05b183f commit e9895d2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions gguf-py/gguf/gguf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit e9895d2

Please sign in to comment.