]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Check the existence of f16_model_path_base in quantize.py (#574)
authordotpy314 <redacted>
Tue, 28 Mar 2023 15:06:28 +0000 (23:06 +0800)
committerGitHub <redacted>
Tue, 28 Mar 2023 15:06:28 +0000 (18:06 +0300)
Co-authored-by: Jincheng Miao <redacted>
quantize.py

index 16b5963d3f25434c1d6b919e2a5f138f07c2f142..641df8dda1b1e5efe1aec55082b3fa6a83b41f64 100644 (file)
@@ -74,6 +74,10 @@ def main():
             args.models_path, model, "ggml-model-f16.bin"
         )
 
+        if not os.path.isfile(f16_model_path_base):
+            print(f'The file %s was not found' % f16_model_path_base)
+            sys.exit(1)
+
         f16_model_parts_paths = map(
             lambda filename: os.path.join(f16_model_path_base, filename),
             glob.glob(f"{f16_model_path_base}*")