From f2e4d92528b6e85e7d5d29ba717ae0d9725192de Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Sun, 19 May 2024 21:34:42 -0500 Subject: [PATCH] Added const reference for std::pair<> and std::tuple<> more 16 bytes: - std::pair (72 bytes -> 8 bytes) - std::tuple (40 bytes -> 8 bytes) --- common/common.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index 3eb71ed67..c4bccd6c4 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -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 & la : params.lora_adapter) { + for (std::tuple & 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 & la : params.lora_adapter) { + for (std::tuple & la : params.lora_adapter) { if (std::get<1>(la) == 1.0f) { continue; }