chore: clear cache when there's no active requests

release-notes-05
Meng Zhang 2023-10-29 16:30:16 -07:00
parent 81ed9d3325
commit 7330d75de6
2 changed files with 2 additions and 1 deletions

@ -1 +1 @@
Subproject commit 638ff1aba1fa200f0bdc0ee3709176ddd783a49d Subproject commit f858db8db3a98968ad3764c409e43e44c443079b

View File

@ -100,6 +100,7 @@ class TextInferenceEngineImpl : public TextInferenceEngine {
stopped_requests_.clear(); stopped_requests_.clear();
if (requests_.size() == 0) { if (requests_.size() == 0) {
llama_kv_cache_clear(ctx);
return {}; return {};
} }