Fix T5 model load bug

This commit is contained in:
zhenweijin 2024-08-12 10:25:10 +08:00
parent c21a896405
commit 75febe2e17

View file

@ -690,7 +690,9 @@ struct server_context {
n_ctx = llama_n_ctx(ctx); n_ctx = llama_n_ctx(ctx);
add_bos_token = llama_should_add_bos_token(model); 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; return true;
} }