Skip to content

Commit

Permalink
null terminated seq_id list
Browse files Browse the repository at this point in the history
  • Loading branch information
ngxson committed Oct 12, 2024
1 parent 734f9e2 commit 7264596
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 7264596

Please sign in to comment.