diff --git a/common/speculative.cpp b/common/speculative.cpp index f76d40ab..d63edd74 100644 --- a/common/speculative.cpp +++ b/common/speculative.cpp @@ -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); -} \ No newline at end of file +}