llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Use an argument parsing library

Open Dietr1ch opened this issue 1 year ago • 0 comments

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()

Dietr1ch avatar Mar 13 '23 00:03 Dietr1ch