fix dump_non_result_info_yaml to output multiple lora adapters
This commit is contained in:
parent
b04263c1fe
commit
aecc3b3890
1 changed files with 14 additions and 1 deletions
|
@ -1046,7 +1046,20 @@ void dump_non_result_info_yaml(FILE * stream, const gpt_params & params, const l
|
||||||
fprintf(stream, " %d: %f", lb.first, lb.second);
|
fprintf(stream, " %d: %f", lb.first, lb.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stream, "lora: %s\n", params.lora_adapter.c_str());
|
fprintf(stream, "lora:\n");
|
||||||
|
for (std::tuple<std::string, float> la : params.lora_adapter) {
|
||||||
|
if (std::get<1>(la) != 1.0f) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
fprintf(stream, " - %s\n", std::get<0>(la).c_str());
|
||||||
|
}
|
||||||
|
fprintf(stream, "lora_scaled:\n");
|
||||||
|
for (std::tuple<std::string, float> la : params.lora_adapter) {
|
||||||
|
if (std::get<1>(la) == 1.0f) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
fprintf(stream, " - %s: %f\n", std::get<0>(la).c_str(), std::get<1>(la));
|
||||||
|
}
|
||||||
fprintf(stream, "lora_base: %s\n", params.lora_base.c_str());
|
fprintf(stream, "lora_base: %s\n", params.lora_base.c_str());
|
||||||
fprintf(stream, "low_vram: %s # default: false\n", params.low_vram ? "true" : "false");
|
fprintf(stream, "low_vram: %s # default: false\n", params.low_vram ? "true" : "false");
|
||||||
fprintf(stream, "main_gpu: %d # default: 0\n", params.main_gpu);
|
fprintf(stream, "main_gpu: %d # default: 0\n", params.main_gpu);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue