From 7264596a5c0e86173f4c1f8aeae78fa33a216144 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Sat, 12 Oct 2024 22:53:05 +0200 Subject: [PATCH] null terminated seq_id list --- src/llama.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index df19e1207..b24d4af80 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -21199,7 +21199,8 @@ struct llama_batch_allocr { batch.n_seq_id = n_seq_id.data(); } if (!batch.seq_id) { - seq_id.resize(batch.n_tokens); + seq_id.resize(batch.n_tokens + 1); + seq_id[batch.n_tokens] = NULL; for (int32_t i = 0; i < batch.n_tokens; i++) { seq_id[i] = seq_id_0.data(); }