From 65a3b75dac1fe578fb51f2548924e3df55329600 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sun, 30 Nov 2025 12:55:43 +0800 Subject: [PATCH] rnn warning fix --- gpttype_adapter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index 590e1463a..b662b6148 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -144,6 +144,7 @@ static std::vector logit_biases; static bool add_bos_token = true; // if set to false, mmproj handling breaks. dont disable unless you know what you're doing static bool load_guidance = false; //whether to enable cfg for negative prompts static bool check_slowness = false; //will display a suggestion to use highpriority if slow +static bool showed_rnn_warning = false; static bool highpriority = false; static int delayed_generated_tokens_limit = 0; @@ -495,7 +496,11 @@ void ContextRewind(std::vector &embd, std::vector ¤t_context_tok } if(file_format == FileFormat::RWKV_1 || file_format==FileFormat::RWKV_2 || is_recurrent) { - printf("\nWARNING: RNN models do not support context rewind!\n"); + if(!showed_rnn_warning) + { + showed_rnn_warning = true; + printf("\nWARNING: RNN models do not support context rewind!\n"); + } return; } @@ -3200,6 +3205,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs) llama_perf_context_reset(llama_ctx_v4); } + showed_rnn_warning = false; generation_finished = false; // Set current generation status generated_tokens.clear(); // New Generation, new tokens delayed_generated_tokens.clear();