From 500a1ab4666ff081242dfbfad2fc42de46c0a38b Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Tue, 10 Mar 2026 08:57:31 +0800 Subject: [PATCH] disable smartcache if slots is zero --- gpttype_adapter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index 9662fe4a6..12ffaee7c 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -2597,9 +2597,12 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in //if RNN model AND shifting and fastforward is on, enable smartcache if((llama_model_is_recurrent(llamamodel) || llama_model_is_hybrid(llamamodel)) && kcpp_data->use_fastforward && kcpp_data->use_contextshift) { - printf("RNN or Hyrbid model with FF and shifting flags enabled - SmartCache will be enabled with extra slots. Disable CtxShift if you do not want this.\n",savestate_limit); - kcpp_data->smartcache = true; - savestate_limit += 3; + if(savestate_limit>0) + { + printf("RNN or Hyrbid model with FF and shifting flags enabled - SmartCache will be enabled with extra slots. Disable CtxShift if you do not want this.\n",savestate_limit); + kcpp_data->smartcache = true; + savestate_limit += 3; + } } savestates.resize(savestate_limit); if(kcpp_data->smartcache)