From bbebc76817e3658d698b5f990fef010015a22ad8 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:32:23 +0800 Subject: [PATCH] fix top picks bug, lower input anti abuse thresholds (+1 squashed commits) Squashed commits: [a81d9b21] fix top picks bug, lower input anti abuse thresholds --- gpttype_adapter.cpp | 9 +++++++++ koboldcpp.py | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index e3bb3eef5..50af224ce 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -449,6 +449,15 @@ void ContextRewind(std::vector &embd, std::vector ¤t_context_tok last_n_tokens.resize(last_n_tokens.size() - amount_rewind); } + if(amount_rewind >= top_picks_history.size()) + { + top_picks_history.clear(); + } + else + { + top_picks_history.resize(top_picks_history.size() - amount_rewind); + } + if (amount_rewind >= current_context_tokens.size()) { current_context_tokens.clear(); diff --git a/koboldcpp.py b/koboldcpp.py index c2a602629..65c881e41 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -26,10 +26,10 @@ bias_max_value = 100.0 logprobs_max = 5 # abuse prevention -stop_token_max = 512 -ban_token_max = 1024 -logit_bias_max = 1024 -dry_seq_break_max = 256 +stop_token_max = 256 +ban_token_max = 512 +logit_bias_max = 512 +dry_seq_break_max = 128 # global vars handle = None