From a8d33ebb0deb8dba2a7a3c39cb825e6264e0db16 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Wed, 18 Jun 2025 19:34:12 +0800 Subject: [PATCH] increase genamt hardlimit from 0.1 to 0.2 ratio --- koboldcpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koboldcpp.py b/koboldcpp.py index 3a469945d..b64f1a0fc 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -1384,7 +1384,7 @@ def generate(genparams, stream_flag=False): print(f"\n!!! ====== !!!\n(Warning! Request max_context_length={max_context_length} exceeds allocated context size of {maxctx}. It will be reduced to fit. Consider launching with increased --contextsize to avoid issues. This message will only show once per session.)\n!!! ====== !!!") showmaxctxwarning = False max_context_length = maxctx - min_remain_hardlimit = max(min(max_context_length-4, 16),int(max_context_length*0.1)) + min_remain_hardlimit = max(min(max_context_length-4, 16),int(max_context_length*0.2)) min_remain_softlimit = max(min(max_context_length-4, 16),int(max_context_length*0.4)) if max_length >= (max_context_length-min_remain_softlimit): print(f"\n!!! ====== !!!\nWarning: You are trying to generate text with max_length ({max_length}) near or exceeding max_context_length limit ({max_context_length}).\nMost of the context will be removed, and your outputs will not be very coherent.\nConsider launching with increased --contextsize to avoid issues.\n!!! ====== !!!")