From f46ebd235953fce7ed4a5c4dcb90dc8c7f3af36d Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Tue, 4 Jan 2022 14:18:58 -0500 Subject: [PATCH] Always pass 1.1 as repetition penalty to generator The `dynamic_processor_wrap` makes it so that the repetition penalty is read directly from `vars`, but this only works if the initial repetition sent to `generator` is not equal to 1. So we are now forcing the initial repetition penalty to be something other than 1. --- aiserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index 2bd43be0..cdb7a661 100644 --- a/aiserver.py +++ b/aiserver.py @@ -2560,7 +2560,7 @@ def _generate(txt, minimum, maximum, found_entries): do_sample=True, min_length=minimum, max_length=int(2e9), - repetition_penalty=vars.rep_pen, + repetition_penalty=1.1, bad_words_ids=vars.badwordsids, use_cache=True, num_return_sequences=numseqs