summaryrefslogtreecommitdiff
path: root/llama.h
diff options
context:
space:
mode:
Diffstat (limited to 'llama.h')
-rw-r--r--llama.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/llama.h b/llama.h
index 19221759..c35193a8 100644
--- a/llama.h
+++ b/llama.h
@@ -96,6 +96,18 @@ extern "C" {
const char * fname_out,
enum llama_ftype ftype);
+ // Apply a LoRA adapter to a loaded model
+ // path_base_model is the path to a higher quality model to use as a base for
+ // the layers modified by the adapter. Can be NULL to use the current loaded model.
+ // 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(
+ struct llama_context * ctx,
+ const char * path_lora,
+ const char * path_base_model,
+ int n_threads);
+
// Returns the KV cache that will contain the context for the
// ongoing prediction with the model.
LLAMA_API const uint8_t * llama_get_kv_cache(struct llama_context * ctx);