From 64e0abb8cc43082bba69c65566043e7c9d1da7fe Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 4 Nov 2023 17:53:22 -0700 Subject: [PATCH] fix(llama.cpp): wrongly index for n_seq in warmup --- crates/llama-cpp-bindings/src/engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/llama-cpp-bindings/src/engine.cc b/crates/llama-cpp-bindings/src/engine.cc index e0addccf3146..ac9d8ea5b8ba 100644 --- a/crates/llama-cpp-bindings/src/engine.cc +++ b/crates/llama-cpp-bindings/src/engine.cc @@ -94,7 +94,7 @@ class TextInferenceEngineImpl : public TextInferenceEngine { for (int i = 0; i < batch_.n_tokens; ++i) { batch_.token[i] = 0; batch_.pos[i] = i; - batch_.n_seq_id[0] = 1; + batch_.n_seq_id[i] = 1; batch_.seq_id[i][0] = 0; batch_.logits[i] = false; }