From 9b58edf2d8af6c50e7a0c23034c29cdcc6422ced Mon Sep 17 00:00:00 2001 From: MaggotHATE Date: Wed, 20 Nov 2024 15:40:59 +0500 Subject: [PATCH] Fix trailing whitespace, reverted `enable_chat_template` in arg * `enable_chat_template` is no used by `server` --- common/arg.cpp | 4 ++-- examples/server/server.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/arg.cpp b/common/arg.cpp index 97fedfcc3..bb005689c 100644 --- a/common/arg.cpp +++ b/common/arg.cpp @@ -850,7 +850,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex "string to prefix user inputs with (default: empty)", [](common_params & params, const std::string & value) { params.input_prefix = value; - // params.enable_chat_template = false; + params.enable_chat_template = false; } ).set_examples({LLAMA_EXAMPLE_MAIN, LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_INFILL})); add_opt(common_arg( @@ -858,7 +858,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex "string to suffix after user inputs with (default: empty)", [](common_params & params, const std::string & value) { params.input_suffix = value; - // params.enable_chat_template = false; + params.enable_chat_template = false; } ).set_examples({LLAMA_EXAMPLE_MAIN, LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_INFILL})); add_opt(common_arg( diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 8777882db..1d68cd644 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -3228,7 +3228,7 @@ int main(int argc, char ** argv) { params.chat_template = "chatml"; } } else if (!params.input_prefix.empty() || !params.input_suffix.empty()) { - LOG_WRN("%s: Prefix and suffix are not used because a chat template is defined.\n", __func__); + LOG_WRN("%s: Prefix and suffix are not used because a chat template is defined.\n", __func__); } // print sample chat example to make it clear which template is used