llama.cpp
llama.cpp copied to clipboard
Use an argument parsing library
The argument parsing for convert-ckpt-to-ggml.py
is quite ad-hoc and hard to follow.
I'm thinking that something around this would go a long way in making the arguments easier to use and follow in the code.
import argparse
ARG_PARSER = argparse.ArgumentParser()
ARG_PARSER.add_argument("--model",
type=str,
help="Model to convert")
ARG_PARSER.add_argument("--ftype",
type=str,
choices=["f16", "f32"],
help="Floating point type to use")
ARG_PARSER.add_argument("--output",
type=str,
help="Where to write the converted model")
ARGS = ARG_PARSER.parse_args()