diff --git a/examples/batched/batched.cpp b/examples/batched/batched.cpp index 4b4e25176..d1c66af46 100644 --- a/examples/batched/batched.cpp +++ b/examples/batched/batched.cpp @@ -106,10 +106,11 @@ int main(int argc, char ** argv) { batch.n_tokens = tokens_list.size(); for (int32_t i = 0; i < batch.n_tokens; i++) { - batch.token[i] = tokens_list[i]; - batch.pos[i] = i; - batch.seq_id[i] = 0; - batch.logits[i] = false; + batch.token[i] = tokens_list[i]; + batch.pos[i] = i; + batch.n_seq_id[i] = 1; + batch.seq_id[i][0] = 0; + batch.logits[i] = false; } // llama_decode will output logits only for the last token of the prompt