Skip to content

Commit

Permalink
gguf-py : fix dtype check (#6045)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Mar 14, 2024
1 parent 15a3332 commit 77178ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gguf-py/gguf/gguf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def add_tensor_info(
for i in range(n_dims):
self.ti_data += self._pack("Q", tensor_shape[n_dims - 1 - i])
if raw_dtype is None:
if tensor_shape == np.float32:
if tensor_dtype == np.float32:
dtype = GGMLQuantizationType.F32
elif tensor_dtype == np.float16:
dtype = GGMLQuantizationType.F16
Expand Down

0 comments on commit 77178ee

Please sign in to comment.