Update gguf-py/gguf/gguf_writer.py
Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
parent
05b183fe7b
commit
e9895d2ce9
1 changed files with 0 additions and 2 deletions
|
@ -358,8 +358,6 @@ class GGUFWriter:
|
||||||
# TODO: cleaner way to get the first key
|
# TODO: cleaner way to get the first key
|
||||||
first_tensor_name = [name for name, _ in zip(self.tensors[file_id].keys(), range(1))][0]
|
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)
|
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
|
assert ti.nbytes == tensor.nbytes
|
||||||
|
|
||||||
self.write_padding(fout, fout.tell())
|
self.write_padding(fout, fout.tell())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue