Skip to content

Commit 0d96efa

Browse files
committed
batched : fix n_seq_id
1 parent 7e48e21 commit 0d96efa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/batched/batched.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ int main(int argc, char ** argv) {
106106
batch.n_tokens = tokens_list.size();
107107

108108
for (int32_t i = 0; i < batch.n_tokens; i++) {
109-
batch.token[i] = tokens_list[i];
110-
batch.pos[i] = i;
111-
batch.seq_id[i] = 0;
112-
batch.logits[i] = false;
109+
batch.token[i] = tokens_list[i];
110+
batch.pos[i] = i;
111+
batch.n_seq_id[i] = 1;
112+
batch.seq_id[i][0] = 0;
113+
batch.logits[i] = false;
113114
}
114115

115116
// llama_decode will output logits only for the last token of the prompt

0 commit comments

Comments
 (0)