From ffc8e5af11404c6ca41476c77d86a4bc811cecf0 Mon Sep 17 00:00:00 2001 From: Maximilian Kimmich <maximilian.kimmich@ims.uni-stuttgart.de> Date: Wed, 2 Oct 2024 17:03:39 +0200 Subject: [PATCH] Fix issue where generation for de-cot was stopped early --- evoprompt/evolution/evolution.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evoprompt/evolution/evolution.py b/evoprompt/evolution/evolution.py index afc5008..57556f0 100644 --- a/evoprompt/evolution/evolution.py +++ b/evoprompt/evolution/evolution.py @@ -469,7 +469,9 @@ class DifferentialEvolutionWithCot(DifferentialEvolution): system_message=SYSTEM_MESSAGE, prompt=filled_prompt, history=history, - use_randomness=idx in self.steps_using_randomness, + # the models often repeat the instuction which could also contain </prompt> therefore we should not stop early + stop=None, # "</prompt>" if idx == len(DE_COT_PROMPTS) - 1 else None, + use_randomness=True, ) ) logger.debug( -- GitLab