Skip to content

LLM inference in C/C++

C++ ggml

llama : use GGML_ABORT instead of throw (#29840)

Adrien Gallouët6805ae35dfbd
diff --git a/src/llama.cpp b/src/llama.cpp
index e97272c889..9beb14841f 100644
--- a/src/llama.cpp
+++ b/src/llama.cpp
@@ -72,7 +72,7 @@ enum llama_load_mode llama_load_mode_from_str(const char * str) {
if (std::strcmp(str, "mlock") == 0) { return LLAMA_LOAD_MODE_MLOCK; }
if (std::strcmp(str, "mmap+mlock") == 0) { return LLAMA_LOAD_MODE_MMAP_MLOCK; }
if (std::strcmp(str, "dio") == 0) { return LLAMA_LOAD_MODE_DIRECT_IO; }
- throw std::invalid_argument(std::string("unknown load mode: ") + str);
+ GGML_ABORT("unknown load mode: %s", str);
}
struct llama_sampler_chain_params llama_sampler_chain_default_params() {