From 9829b5b38becc050e22c759fde73c3ef8a860898 Mon Sep 17 00:00:00 2001 From: slaren Date: Sat, 18 Nov 2023 15:59:32 +0100 Subject: [PATCH] llama.cpp : escape new lines in gguf kv info prints --- llama.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llama.cpp b/llama.cpp index 56d8e765c..062c9757b 100644 --- a/llama.cpp +++ b/llama.cpp @@ -1871,6 +1871,7 @@ struct llama_model_loader { if (value.size() > MAX_VALUE_LEN) { value = format("%s...", value.substr(0, MAX_VALUE_LEN - 3).c_str()); } + replace_all(value, "\n", "\\n"); LLAMA_LOG_INFO("%s: - kv %3d: %42s %-16s = %s\n", __func__, i, name, type_name.c_str(), value.c_str()); }