Added const reference for std::pair<> and std::tuple<> more 16 bytes:

- std::pair<llama_ngram, llama_ngram_cache_part> (72 bytes -> 8 bytes)
- std::tuple<std::string, float> (40 bytes -> 8 bytes)
This commit is contained in:
Herman Semenov 2024-05-19 21:34:42 -05:00
parent ce4a3904d1
commit f2e4d92528

View file

@ -2679,14 +2679,14 @@ void dump_non_result_info_yaml(FILE * stream, const gpt_params & params, const l
}
fprintf(stream, "lora:\n");
for (const std::tuple<std::string, float> & la : params.lora_adapter) {
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 (const std::tuple<std::string, float> & la : params.lora_adapter) {
for (std::tuple<std::string, float> & la : params.lora_adapter) {
if (std::get<1>(la) == 1.0f) {
continue;
}