Skip to content

Commit

Permalink
gguf-py : fix dtype check (ggerganov#6045)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov authored and NeoZhangJianyu committed Mar 15, 2024
1 parent 51945cf commit 42b03c4
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 42b03c4

Please sign in to comment.