llm: add back check for empty token cache

This commit is contained in:
jmorganca 2024-04-30 17:38:44 -04:00
parent e33d5c2dbc
commit fcf4d60eee

View file

@ -1032,7 +1032,7 @@ struct llama_server_context
slot.has_next_token = false;
}
if (llama_token_is_eog(model, result.tok))
if (!slot.cache_tokens.empty() && llama_token_is_eog(model, result.tok))
{
slot.stopped_eos = true;
slot.has_next_token = false;