diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 6f312b38b..3cb79b79e 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -211,7 +211,6 @@ int main(int argc, char ** argv) { int guidance_offset = 0; int original_prompt_len = 0; if (ctx_guidance) { - params.cfg_negative_prompt.insert(0, 1, ' '); guidance_inp = ::llama_tokenize(ctx_guidance, params.cfg_negative_prompt, add_bos); std::vector original_inp = ::llama_tokenize(ctx, params.prompt, add_bos); diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 615801fe5..e13bf76e6 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -286,7 +286,6 @@ struct llama_server_context std::vector p; if (first) { - s.insert(0, 1, ' '); // add a space if it's the first p = ::llama_tokenize(ctx, s, add_bos); first = false; } @@ -309,7 +308,6 @@ struct llama_server_context else { auto s = json_prompt.template get(); - s.insert(0, 1, ' '); // always add a first space prompt_tokens = ::llama_tokenize(ctx, s, add_bos); }