Merge afa6800eb1
into 4134999e01
This commit is contained in:
commit
de512ae86e
2 changed files with 5 additions and 1 deletions
|
@ -693,7 +693,10 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17190,6 +17190,7 @@ bool llama_model_has_encoder(const struct llama_model * model) {
|
||||||
switch (model->arch) {
|
switch (model->arch) {
|
||||||
case LLM_ARCH_T5: return true;
|
case LLM_ARCH_T5: return true;
|
||||||
case LLM_ARCH_T5ENCODER: return true;
|
case LLM_ARCH_T5ENCODER: return true;
|
||||||
|
case LLM_ARCH_JINA_BERT_V2: return true;
|
||||||
default: return false;
|
default: return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue