Add LoRA support (#820)

This commit is contained in:
slaren 2023-04-17 17:28:55 +02:00 committed by GitHub
parent efd05648c8
commit 315a95a4d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 753 additions and 41 deletions

View file

@ -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");