diff options
author | slaren <2141330+slaren@users.noreply.github.com> | 2023-04-17 17:28:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 17:28:55 +0200 |
commit | 315a95a4d30db726fb7d244dd3b9e90a83fb1616 (patch) | |
tree | 569d8140cde36ad971d3d3120556ab5533603931 /examples/perplexity | |
parent | efd05648c88a0923a55f56e7ce1b0f9c33410afb (diff) |
Add LoRA support (#820)
Diffstat (limited to 'examples/perplexity')
-rw-r--r-- | examples/perplexity/perplexity.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/perplexity/perplexity.cpp b/examples/perplexity/perplexity.cpp index 19449e1..80792ea 100644 --- a/examples/perplexity/perplexity.cpp +++ b/examples/perplexity/perplexity.cpp @@ -134,6 +134,17 @@ int main(int argc, char ** argv) { } } + if (!params.lora_adapter.empty()) { + int err = llama_apply_lora_from_file(ctx, + params.lora_adapter.c_str(), + params.lora_base.empty() ? NULL : params.lora_base.c_str(), + params.n_threads); + if (err != 0) { + fprintf(stderr, "%s: error: failed to apply lora adapter\n", __func__); + return 1; + } + } + // print system information { fprintf(stderr, "\n"); |