8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8bdd65 commit b8fe4b5Copy full SHA for b8fe4b5
examples/main/main.cpp
@@ -297,6 +297,9 @@ int main(int argc, char ** argv) {
297
LOG_TEE("%s: session file matches %zu / %zu tokens of prompt\n",
298
__func__, n_matching_session_tokens, embd_inp.size());
299
}
300
+
301
+ // remove any "future" tokens that we might have inherited from the previous session
302
+ llama_kv_cache_tokens_rm(ctx, n_matching_session_tokens, -1);
303
304
305
LOGLN(
@@ -545,9 +548,6 @@ int main(int argc, char ** argv) {
545
548
if (i > 0) {
546
549
embd.erase(embd.begin(), embd.begin() + i);
547
550
-
- // remove any "future" tokens that we might have inherited from the session from the KV cache
- llama_kv_cache_tokens_rm(ctx, n_past, -1);
551
552
553
// evaluate tokens in batches
0 commit comments