]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : fix EOS token detection with disabled cache (#5938)
authorGeorgi Gerganov <redacted>
Fri, 8 Mar 2024 10:40:02 +0000 (12:40 +0200)
committerGitHub <redacted>
Fri, 8 Mar 2024 10:40:02 +0000 (12:40 +0200)
examples/server/server.cpp

index f255ad76455bf379eee195796259b85ee239d68c..1434095fc4e09c4fa0ca88e46ceeb758884aad2d 100644 (file)
@@ -1123,7 +1123,7 @@ struct server_context {
             });
         }
 
-        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;