This commit is contained in:
Meng Zhang 2024-08-11 17:06:11 -07:00 committed by GitHub
commit de512ae86e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -693,7 +693,10 @@ struct server_context {
n_ctx = llama_n_ctx(ctx);
add_bos_token = llama_should_add_bos_token(model);
if (!llama_model_has_encoder(model)) {
GGML_ASSERT(llama_add_eos_token(model) != 1);
}
return true;
}

View file

@ -17190,6 +17190,7 @@ bool llama_model_has_encoder(const struct llama_model * model) {
switch (model->arch) {
case LLM_ARCH_T5: return true;
case LLM_ARCH_T5ENCODER: return true;
case LLM_ARCH_JINA_BERT_V2: return true;
default: return false;
}
}