From 36758b10090f2a5f21ae33835c452ba133145282 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Sun, 28 May 2023 16:39:51 +0200 Subject: [PATCH] Setting the ftype argument of the script as optional The 'ftype' positional argument of the convert-pth-to-ggml.py script has default value set. However, as a positional argument it is set to required unless number of values expected is set to accept zero values. Signed-off-by: Jiri Podivin --- convert-pth-to-ggml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert-pth-to-ggml.py b/convert-pth-to-ggml.py index f87ac270c..2f91f44d1 100644 --- a/convert-pth-to-ggml.py +++ b/convert-pth-to-ggml.py @@ -6,6 +6,6 @@ import convert 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', help='file type (0: float32, 1: float16)', type=int, choices=[0, 1], default=1) +parser.add_argument('ftype', help='file type (0: float32, 1: float16)', type=int, choices=[0, 1], default=1, nargs='?') args = parser.parse_args() convert.main(['--outtype', 'f16' if args.ftype == 1 else 'f32', '--', args.dir_model])