diff options
Diffstat (limited to 'convert-pth-to-ggml.py')
-rw-r--r-- | convert-pth-to-ggml.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/convert-pth-to-ggml.py b/convert-pth-to-ggml.py index 46f7eba1..db5b00fe 100644 --- a/convert-pth-to-ggml.py +++ b/convert-pth-to-ggml.py @@ -27,9 +27,9 @@ from sentencepiece import SentencePieceProcessor def parse_args(): parser = argparse.ArgumentParser(description='Convert a LLaMA model checkpoint to a ggml compatible file') - parser.add_argument('dir_model', help='directory containing the model checkpoint') - parser.add_argument('ftype', type=int, choices=[0, 1], default=1, help='file type (0: float32, 1: float16)') - parser.add_argument('vocab_only', type=bool, default=False, help='only write vocab to file') + parser.add_argument('dir_model', help='directory containing the model checkpoint') + parser.add_argument('ftype', help='file type (0: float32, 1: float16)', type=int, choices=[0, 1], default=1) + parser.add_argument('vocab_only', help='only write vocab to file', type=int, default=0, nargs='?') return parser.parse_args() def get_n_parts(dim): @@ -135,6 +135,8 @@ def main(): hparams, tokenizer = load_hparams_and_tokenizer(dir_model) + print(args) + # if only writing vocab to file if args.vocab_only: |