From 495191a54a1adfa7113ddffd4a8809652e078778 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 18 Mar 2024 12:14:16 +0100 Subject: [PATCH] fix(llama.cpp): fix eos without cache --- backend/cpp/llama/grpc-server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/cpp/llama/grpc-server.cpp b/backend/cpp/llama/grpc-server.cpp index c91ce854..a2e39a9c 100644 --- a/backend/cpp/llama/grpc-server.cpp +++ b/backend/cpp/llama/grpc-server.cpp @@ -1084,7 +1084,7 @@ struct llama_server_context slot.has_next_token = false; } - if (!slot.cache_tokens.empty() && result.tok == llama_token_eos(model)) + if (result.tok == llama_token_eos(model)) { slot.stopped_eos = true; slot.has_next_token = false;