]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
export-lora : handle help argument (#8497)
authorSteve Bonds <redacted>
Tue, 16 Jul 2024 07:04:45 +0000 (00:04 -0700)
committerGitHub <redacted>
Tue, 16 Jul 2024 07:04:45 +0000 (10:04 +0300)
The --help option on export-lora isn't accepted as valid. The help still gets displayed by default, but the script exits with an error message and nonzero status.

examples/export-lora/export-lora.cpp

index 08413f57e4c3a3ec81935a4ce382811638771ad4..16f27aa77b500d67ecc8f3ce0d492a08109a8a4b 100644 (file)
@@ -190,6 +190,9 @@ static bool export_lora_params_parse(int argc, char ** argv, struct export_lora_
             if (params->n_threads <= 0) {
                 params->n_threads = std::thread::hardware_concurrency();
             }
+        } else if (arg == "-h" || arg == "--help") {
+            export_lora_print_usage(argc, argv, &default_params);
+            exit(0);
         } else {
             fprintf(stderr, "error: unknown argument: '%s'\n", arg.c_str());
             export_lora_print_usage(argc, argv, &default_params);