From ac19d5101ffbac2a24426274a33e03a853bda15b Mon Sep 17 00:00:00 2001 From: kernyan Date: Sun, 16 Apr 2023 00:47:01 -0400 Subject: [PATCH] revert incorrect eos_token_id change from #814 (#1261) - fixes #1054 --- modules/text_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/text_generation.py b/modules/text_generation.py index 93288316..7bfaafe0 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -209,7 +209,7 @@ def generate_reply(question, state, eos_token=None, stopping_strings=[]): else: for k in ['max_new_tokens', 'do_sample', 'temperature']: generate_params[k] = state[k] - generate_params['stop'] = state['eos_token_ids'][-1] + generate_params['stop'] = eos_token_ids[-1] if not shared.args.no_stream: generate_params['max_new_tokens'] = 8