From 5ed92192216831283727c5b68b23e07e595dc1d4 Mon Sep 17 00:00:00 2001 From: Dietrich Daroch Date: Sun, 12 Mar 2023 17:45:55 -0700 Subject: [PATCH] Update convert-pth-to-ggml.py Co-authored-by: Jed Fox --- convert-pth-to-ggml.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/convert-pth-to-ggml.py b/convert-pth-to-ggml.py index 1215395c7..c1ca20084 100644 --- a/convert-pth-to-ggml.py +++ b/convert-pth-to-ggml.py @@ -42,11 +42,7 @@ ARG_PARSER.add_argument("--output", help="Model to write") ARGS = ARG_PARSER.parse_args() -FTYPE_IDX = -1 -if ARGS.ftype == "f16": - FTYPE_IDX = 1 -elif ARGS.ftype == "f32": - FTYPE_IDX = 0 +FTYPE_IDX = {"f16": 1, "f32": 0}[ARGS.ftype] fname_hparams = ARGS.model + "/params.json" fname_tokenizer = ARGS.model + "/../tokenizer.model"