Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 6d0015d

Browse files
committed
kv cache clear when the model is stopped
1 parent fd1f9fc commit 6d0015d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/llamaCPP.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ void llamaCPP::backgroundTask() {
454454
// model_loaded =
455455
llama.update_slots();
456456
}
457-
LOG_INFO << "Background task stopped!";
457+
LOG_INFO << "Background task stopped! ";
458+
llama.kv_cache_clear();
459+
LOG_INFO << "KV cache cleared!";
458460
return;
459461
}
460462

0 commit comments

Comments
 (0)