From fea717efa8355a13fddb110337f6a2ccae794872 Mon Sep 17 00:00:00 2001 From: JohannesGaessler Date: Wed, 14 Jun 2023 21:21:28 +0200 Subject: [PATCH] Better error when using both LoRA + GPU layers --- examples/common.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/common.cpp b/examples/common.cpp index dc69e5373..b47f06273 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -412,6 +412,14 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) { gpt_print_usage(argc, argv, default_params); exit(1); } + +#ifdef GGML_USE_CUBLAS + if (!params.lora_adapter.empty() && params.n_gpu_layers > 0) { + fprintf(stderr, "%s: error: the simultaneous use of LoRAs and GPU acceleration is not supported", __func__); + exit(1); + } +#endif // GGML_USE_CUBLAS + if (escape_prompt) { process_escapes(params.prompt); }