From: Brad Ito Date: Tue, 22 Aug 2023 09:34:07 +0000 (-0700) Subject: starcoder : fix starcoder/convert-hf-to-ggml.py to handle current-folder output file... X-Git-Tag: upstream/0.0.1642~1270 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=978836a94d89e7369cf64b2dc78db72dacb6c033;p=pkg%2Fggml%2Fsources%2Fggml starcoder : fix starcoder/convert-hf-to-ggml.py to handle current-folder output file - as in README example (#458) --- diff --git a/examples/starcoder/convert-hf-to-ggml.py b/examples/starcoder/convert-hf-to-ggml.py index ef93dfde..30af75cb 100644 --- a/examples/starcoder/convert-hf-to-ggml.py +++ b/examples/starcoder/convert-hf-to-ggml.py @@ -46,7 +46,9 @@ args = parser.parse_args() use_f16 = not args.use_f32 fname_out = args.outfile -os.makedirs(os.path.dirname(fname_out), exist_ok=True) +fname_dir = os.path.dirname(fname_out) +if fname_dir: + os.makedirs(fname_dir, exist_ok=True) print("Loading model: ", args.model_name_or_path) tokenizer = AutoTokenizer.from_pretrained(args.model_name_or_path)