From 6a4becb731726a746f7bf7c365a62352bf5e87a3 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Wed, 21 Aug 2024 00:59:26 +0800 Subject: [PATCH] dry is still buggy because token indexes are wrong --- gpttype_adapter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index 6dff5f9cd..a7e134b8e 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -698,6 +698,10 @@ void sample_dry(int n_ctx, int penalty_range, float penalty_multiplier, float pe candidates->data[token].logit -= penalty; ++count; } + if(count>0) + { + candidates->sorted = false; + } if (debugmode==1 && !dry_max_token_repeat.empty()) { printf("]\n"); }