diff options
author | Jared Van Bortel <jared@nomic.ai> | 2024-03-28 11:44:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 11:44:36 -0400 |
commit | be55134a535f7218c53f39211755b1c7550851b2 (patch) | |
tree | f27a84973005f1e46d07323bdd1f983a11327b05 /convert-persimmon-to-gguf.py | |
parent | 66ba56025602270152f5ba5234f3a80be3dee1c9 (diff) |
convert : refactor vocab selection logic (#6355)
Diffstat (limited to 'convert-persimmon-to-gguf.py')
-rwxr-xr-x | convert-persimmon-to-gguf.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/convert-persimmon-to-gguf.py b/convert-persimmon-to-gguf.py index def21053..ccb99279 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 + "'") |