diff --git a/src/llama-context.cpp b/src/llama-context.cpp --- a/src/llama-context.cpp +++ b/src/llama-context.cpp @@ -2133,7 +2133,7 @@ uint32_t llama_context::output_reserve(int32_t n_outputs) { const auto n_embd = hparams.n_embd; const auto n_embd_out = hparams.n_embd_out(); - bool has_logits = true; + bool has_logits = !(cparams.embeddings && !cparams.causal_attn); bool has_embd = cparams.embeddings; bool has_embd_nextn = cparams.embeddings_nextn;