mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
added support for lora base
This commit is contained in:
parent
375540837e
commit
66a3f4e421
4 changed files with 30 additions and 8 deletions
|
@ -31,6 +31,7 @@
|
|||
//shared
|
||||
std::string executable_path = "";
|
||||
std::string lora_filename = "";
|
||||
std::string lora_base = "";
|
||||
bool generation_finished;
|
||||
std::vector<std::string> generated_tokens;
|
||||
|
||||
|
@ -341,9 +342,15 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in
|
|||
{
|
||||
printf("\nAttempting to apply LORA adapter: %s\n", lora_filename.c_str());
|
||||
|
||||
const char * lora_base_arg = NULL;
|
||||
if (lora_base != "") {
|
||||
printf("Using LORA base model: %s\n", lora_base.c_str());
|
||||
lora_base_arg = lora_base.c_str();
|
||||
}
|
||||
|
||||
int err = llama_v2_apply_lora_from_file(llama_ctx_v2,
|
||||
lora_filename.c_str(),
|
||||
NULL,
|
||||
lora_base_arg,
|
||||
n_threads);
|
||||
if (err != 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue