From d7714a8f801ce1fb4d8483214b548206f9a4c1a7 Mon Sep 17 00:00:00 2001 From: Didzis Gosko Date: Wed, 21 Jun 2023 00:08:49 +0300 Subject: [PATCH] Deprecate public API function llama_apply_lora_from_file --- examples/common.cpp | 2 +- llama.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/common.cpp b/examples/common.cpp index b7f546fe9..6ac484555 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -566,7 +566,7 @@ std::tuple llama_init_from_gpt_par } if (!params.lora_adapter.empty()) { - int err = llama_apply_lora_from_file(lctx, + int err = llama_model_apply_lora_from_file(model, params.lora_adapter.c_str(), params.lora_base.empty() ? NULL : params.lora_base.c_str(), params.n_threads); diff --git a/llama.h b/llama.h index 61737d2df..02f235172 100644 --- a/llama.h +++ b/llama.h @@ -179,11 +179,12 @@ extern "C" { // The model needs to be reloaded before applying a new adapter, otherwise the adapter // will be applied on top of the previous one // Returns 0 on success - LLAMA_API int llama_apply_lora_from_file( + LLAMA_API DEPRECATED(int llama_apply_lora_from_file( struct llama_context * ctx, const char * path_lora, const char * path_base_model, - int n_threads); + int n_threads), + "please use llama_model_apply_lora_from_file instead"); LLAMA_API int llama_model_apply_lora_from_file( const struct llama_model * model,