fix missing n_past in various places

this is actually a revert of cda0e4b648
This commit is contained in:
Xuan Son Nguyen
2025-03-14 10:47:08 +01:00
parent 32940369d3
commit 07d84fa3c2
6 changed files with 18 additions and 18 deletions

View File

@ -133,7 +133,7 @@ int main(int argc, char ** argv) {
result1 += next_token_str;
llama_batch_ext_clear(batch);
llama_seq_id seq_id = 1;
llama_seq_id seq_id = 0;
llama_batch_ext_add_text(batch, next_token, 0, &seq_id, 1, true);
if (llama_decode_ext(ctx2, batch)) {
@ -215,7 +215,7 @@ int main(int argc, char ** argv) {
result2 += next_token_str;
llama_batch_ext_clear(batch);
llama_seq_id seq_id = 1;
llama_seq_id seq_id = 1; // seq 1 instead of 0
llama_batch_ext_add_text(batch, next_token, 0, &seq_id, 1, true);
if (llama_decode_ext(ctx3, batch)) {