From: Paul Dubs Date: Tue, 21 Apr 2026 18:29:07 +0000 (+0200) Subject: spec : reset i_last when low acceptance streak occurs (#22168) X-Git-Tag: upstream/0.0.10438~1562 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=72d693e4fbf0a188172951fe667d5e2f354ee438;p=pkg%2Fggml%2Fsources%2Fllama.cpp spec : reset i_last when low acceptance streak occurs (#22168) By resetting i_last to zero, we will include the current context when rebuilding the speculative map. --- diff --git a/common/speculative.cpp b/common/speculative.cpp index daa2b5a8a..20e38bec4 100644 --- a/common/speculative.cpp +++ b/common/speculative.cpp @@ -749,6 +749,7 @@ struct common_speculative_state_ngram_mod : public common_speculative_state { mod.reset(); n_low = 0; + i_last = 0; } } else { n_low = 0;