From 3d5929e8eea7bc7f36763ec0cd0596ad67692656 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Thu, 19 Oct 2023 14:43:19 +0300 Subject: [PATCH] server : bug fix in ingest_images n_tokens is incremented internally by llama_batch_add --- examples/server/server.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 746971520..9137ab32e 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -963,7 +963,6 @@ struct llama_server_context { llama_batch_add(batch, append_tokens[i], slot.n_past, { slot.id }, true); slot.n_past += 1; - batch.n_tokens += 1; } } return true;