Reset i_last when low acceptance streak occurs (#1701)

By resetting i_last to zero, we will include the current context when rebuilding the speculative map.
This commit is contained in:
Paul Dubs 2026-04-27 14:05:36 +02:00 committed by GitHub
parent fb07c1e6e5
commit 0a167082a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -693,6 +693,7 @@ struct common_speculative_state_ngram_mod : public common_speculative_state {
mod.reset();
n_low = 0;
i_last = 0;
}
} else {
n_low = 0;
@ -1459,4 +1460,4 @@ void mtp_accept_tokens(
mtp_update_kv_cache(ctx, accepted_batch, false);
llama_batch_free(accepted_batch);
}
}