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 <jpodivin@gmail.com>
This commit is contained in:
parent
a6704643b6
commit
36758b1009
1 changed files with 1 additions and 1 deletions
|
@ -6,6 +6,6 @@ import convert
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Convert a LLaMA model checkpoint to a ggml compatible file')
|
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('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()
|
args = parser.parse_args()
|
||||||
convert.main(['--outtype', 'f16' if args.ftype == 1 else 'f32', '--', args.dir_model])
|
convert.main(['--outtype', 'f16' if args.ftype == 1 else 'f32', '--', args.dir_model])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue