From 75febe2e17025727c40baeb1303e55debe9f4a46 Mon Sep 17 00:00:00 2001 From: zhenweijin Date: Mon, 12 Aug 2024 10:25:10 +0800 Subject: [PATCH] Fix T5 model load bug --- examples/server/server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index d178ca0f79b83..1a2e07f5f9848 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -690,7 +690,9 @@ struct server_context { n_ctx = llama_n_ctx(ctx); add_bos_token = llama_should_add_bos_token(model); - GGML_ASSERT(llama_add_eos_token(model) != 1); + if (!llama_model_has_encoder(model)) { + GGML_ASSERT(llama_add_eos_token(model) != 1); + } return true; }