removed unneccessary static string escape

This commit is contained in:
vvhg1 2023-10-19 08:35:27 +02:00
parent ee652b2ab4
commit 02ac367d0c

View file

@ -320,14 +320,8 @@ int main(int argc, char ** argv) {
} }
// prefix & suffix for instruct mode // prefix & suffix for instruct mode
std::string inp_pfx_str = "\n\n### Instruction:\n\n"; const auto inp_pfx = ::llama_tokenize(ctx, "\n\n### Instruction:\n\n", add_bos);
std::string inp_sfx_str = "\n\n### Response:\n\n"; const auto inp_sfx = ::llama_tokenize(ctx, "\n\n### Response:\n\n", false);
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);
LOG("inp_pfx: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, inp_pfx)); LOG("inp_pfx: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, inp_pfx));
LOG("inp_sfx: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, inp_sfx)); LOG("inp_sfx: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, inp_sfx));