From 02ac367d0c379b91f90302d4e0a2d41921e2f015 Mon Sep 17 00:00:00 2001 From: vvhg1 Date: Thu, 19 Oct 2023 08:35:27 +0200 Subject: [PATCH] removed unneccessary static string escape --- examples/main/main.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 5545831c2..ad7b7abf5 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -320,14 +320,8 @@ int main(int argc, char ** argv) { } // prefix & suffix for instruct mode - std::string inp_pfx_str = "\n\n### Instruction:\n\n"; - std::string inp_sfx_str = "\n\n### Response:\n\n"; - if (params.escape) { - process_escapes(inp_pfx_str); - process_escapes(inp_sfx_str); - } - const auto inp_pfx = ::llama_tokenize(ctx, inp_pfx_str, add_bos); - const auto inp_sfx = ::llama_tokenize(ctx, inp_sfx_str, false); + const auto inp_pfx = ::llama_tokenize(ctx, "\n\n### Instruction:\n\n", add_bos); + const auto inp_sfx = ::llama_tokenize(ctx, "\n\n### Response:\n\n", false); LOG("inp_pfx: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, inp_pfx)); LOG("inp_sfx: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, inp_sfx));