From 3144563db19a246dc3607c62e18e7465789a33ea Mon Sep 17 00:00:00 2001 From: KerfuffleV2 Date: Fri, 6 Oct 2023 06:23:49 -0600 Subject: [PATCH] Use n_ctx in kv find slot for consistency --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 75916e54d..ce4d68f38 100644 --- a/llama.cpp +++ b/llama.cpp @@ -1316,7 +1316,7 @@ static bool llama_kv_cache_find_slot( while (true) { if (cache.head + n_tokens > n_ctx) { - n_tested += cache.size - cache.head; + n_tested += n_ctx - cache.head; cache.head = 0; continue; }