Use n_ctx in kv find slot for consistency

This commit is contained in:
KerfuffleV2 2023-10-06 06:23:49 -06:00
parent abafd01ec8
commit 3144563db1

View file

@ -1316,7 +1316,7 @@ static bool llama_kv_cache_find_slot(
while (true) { while (true) {
if (cache.head + n_tokens > n_ctx) { if (cache.head + n_tokens > n_ctx) {
n_tested += cache.size - cache.head; n_tested += n_ctx - cache.head;
cache.head = 0; cache.head = 0;
continue; continue;
} }