diff options
author | Jared Van Bortel <jared@nomic.ai> | 2024-01-20 18:14:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-20 18:14:18 -0500 |
commit | b43ebde3b0ccbc42d9dd782b32e2fd8eb35b43b5 (patch) | |
tree | 74759304364d6257681e092303c2e125b5113a6d /convert-persimmon-to-gguf.py | |
parent | 97c1549808d2742d37584a3c9df28154bdf34417 (diff) |
convert : partially revert PR #4818 (#5041)
Diffstat (limited to 'convert-persimmon-to-gguf.py')
-rwxr-xr-x | convert-persimmon-to-gguf.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/convert-persimmon-to-gguf.py b/convert-persimmon-to-gguf.py index 1ba5864d..d2be805d 100755 --- a/convert-persimmon-to-gguf.py +++ b/convert-persimmon-to-gguf.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 -import torch +import argparse import os -from pprint import pprint import sys -import argparse from pathlib import Path +from pprint import pprint + +import torch from sentencepiece import SentencePieceProcessor + if 'NO_LOCAL_GGUF' not in os.environ: sys.path.insert(1, str(Path(__file__).parent / 'gguf-py')) import gguf @@ -69,7 +71,7 @@ def main(): persimmon_model = torch.load(args.ckpt_path) hparams = persimmon_model['args'] pprint(hparams) - tensors = {} + tensors: dict[str, torch.Tensor] = {} _flatten_dict(persimmon_model['model'], tensors, None) arch = gguf.MODEL_ARCH.PERSIMMON |