Skip to content

Commit

Permalink
Better error when using both LoRA + GPU layers (#1861)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesGaessler authored Jun 15, 2023
1 parent 254a7a7 commit 6b8312e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6b8312e

Please sign in to comment.