From 03f0c2e8cec9d45f3d971c5d19ca6faf5bd2cf07 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Wed, 27 Mar 2024 12:36:08 -0400 Subject: [PATCH] convert-persimmon : typing fixup --- convert-persimmon-to-gguf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/convert-persimmon-to-gguf.py b/convert-persimmon-to-gguf.py index def210531..ccb99279e 100755 --- a/convert-persimmon-to-gguf.py +++ b/convert-persimmon-to-gguf.py @@ -106,12 +106,12 @@ def main(): tensor_map = gguf.get_tensor_name_map(arch, block_count) print(tensor_map) for name in tensors.keys(): - data = tensors[name] + data_torch = tensors[name] if name.endswith(".self_attention.rotary_emb.inv_freq"): continue - old_dtype = data.dtype + old_dtype = data_torch.dtype # TODO: FP16 conversion produces garbage outputs. (Q8_0 does not, so..?) - data = data.to(torch.float32).squeeze().numpy() + data = data_torch.to(torch.float32).squeeze().numpy() new_name = tensor_map.get_name(name, try_suffixes = (".weight", ".bias")) if new_name is None: print("Can not map tensor '" + name + "'")