server : fix EOS token detection with disabled cache (#5938)

This commit is contained in:
Georgi Gerganov 2024-03-08 12:40:02 +02:00 committed by Jianyu Zhang
parent 4189cf7089
commit 8fb8716df4

View 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;