| 411 | } |
| 412 | |
| 413 | int main(int argc, char ** argv) { |
| 414 | common_params params; |
| 415 | |
| 416 | params.out_file = "ggml-lora-merged-f16.gguf"; |
| 417 | |
| 418 | if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_EXPORT_LORA, print_usage)) { |
| 419 | return 1; |
| 420 | } |
| 421 | |
| 422 | g_verbose = (params.verbosity > 1); |
| 423 | try { |
| 424 | lora_merge_ctx ctx(params.model.path, params.lora_adapters, params.out_file, params.cpuparams.n_threads); |
| 425 | ctx.run_merge(); |
| 426 | } catch (const std::exception & err) { |
| 427 | fprintf(stderr, "%s\n", err.what()); |
| 428 | exit(EXIT_FAILURE); |
| 429 | } |
| 430 | |
| 431 | printf("done, output file is %s\n", params.out_file.c_str()); |
| 432 | |
| 433 | return 0; |
| 434 | } |