瀏覽代碼

llm: add back check for empty token cache

jmorganca 1 年之前
父節點
當前提交
fcf4d60eee
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      llm/ext_server/server.cpp

+ 1 - 1
llm/ext_server/server.cpp

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