summaryrefslogtreecommitdiff
path: root/convert-gptneox-hf-to-gguf.py
diff options
context:
space:
mode:
authorCebtenzzre <cebtenzzre@gmail.com>2023-09-15 12:29:02 -0400
committerGitHub <noreply@github.com>2023-09-15 12:29:02 -0400
commite3d87a6c36eadd84d58763143c6d56a0c771ca40 (patch)
treef439428d2cf79128dacac42906c3439fa58263c3 /convert-gptneox-hf-to-gguf.py
parent8c00b7a6ff38e27fa1e471452b8a480913772c2a (diff)
convert : make ftype optional in simple scripts (#3185)
Diffstat (limited to 'convert-gptneox-hf-to-gguf.py')
-rwxr-xr-xconvert-gptneox-hf-to-gguf.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/convert-gptneox-hf-to-gguf.py b/convert-gptneox-hf-to-gguf.py
index b9c8b460..782410e4 100755
--- a/convert-gptneox-hf-to-gguf.py
+++ b/convert-gptneox-hf-to-gguf.py
@@ -56,10 +56,22 @@ def count_model_parts(dir_model: Path) -> int:
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Convert a GPT-NeoX model to a GGML compatible file")
- parser.add_argument("--vocab-only", action="store_true", help="extract only the vocab")
- parser.add_argument("--outfile", type=Path, help="path to write to; default: based on input")
- parser.add_argument("model", type=Path, help="directory containing model file, or model file itself (*.bin)")
- parser.add_argument("ftype", type=int, choices=[0, 1], help="output format - use 0 for float32, 1 for float16", default = 1)
+ parser.add_argument(
+ "--vocab-only", action="store_true",
+ help="extract only the vocab",
+ )
+ parser.add_argument(
+ "--outfile", type=Path,
+ help="path to write to; default: based on input",
+ )
+ parser.add_argument(
+ "model", type=Path,
+ help="directory containing model file, or model file itself (*.bin)",
+ )
+ parser.add_argument(
+ "ftype", type=int, choices=[0, 1], default=1, nargs='?',
+ help="output format - use 0 for float32, 1 for float16",
+ )
return parser.parse_args()
args = parse_args()