From 113dd60005f57dbd418e1e0854444b0834841b13 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Fri, 20 Oct 2023 20:42:45 +0300 Subject: [PATCH] server : bach has to be allocated for n_parallel sequences --- examples/server/server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 3fa60e0b9..b3add3c40 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -631,7 +631,9 @@ struct llama_server_context LOG_TEE(" -> Slot %i - max context: %i\n", slot.id, max_ctx_per_slot); slots.push_back(slot); } - batch = llama_batch_init(n_ctx, 0, 1); + + batch = llama_batch_init(n_ctx, 0, params.n_parallel); + // empty system prompt system_prompt = ""; num_tokens_system = 0;