server: fix crash in multimodal models with add_bos_token = false
This commit is contained in:
parent
de473f5f8e
commit
3b36f2068e
1 changed files with 1 additions and 1 deletions
|
@ -1835,7 +1835,7 @@ struct llama_server_context
|
||||||
|
|
||||||
slot.cache_tokens = prompt_tokens;
|
slot.cache_tokens = prompt_tokens;
|
||||||
|
|
||||||
if (slot.n_past == slot.num_prompt_tokens)
|
if (slot.n_past == slot.num_prompt_tokens && slot.n_past > 0)
|
||||||
{
|
{
|
||||||
// we have to evaluate at least 1 token to generate logits.
|
// we have to evaluate at least 1 token to generate logits.
|
||||||
LOG_TEE("slot %d : we have to evaluate at least 1 token to generate logits\n", slot.id);
|
LOG_TEE("slot %d : we have to evaluate at least 1 token to generate logits\n", slot.id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue