From 09a7c36e1b7dc64bb9e160c6540b774c96f1598a Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 6 Mar 2023 15:36:35 -0300 Subject: [PATCH] Minor improvement while running custom models --- modules/text_generation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/text_generation.py b/modules/text_generation.py index e2d85514..f585c013 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -97,6 +97,7 @@ def generate_reply(question, max_new_tokens, do_sample, temperature, top_p, typi print(f"Output generated in {(t1-t0):.2f} seconds.") yield formatted_outputs(reply, shared.model_name) else: + yield formatted_outputs(question, shared.model_name) for i in tqdm(range(max_new_tokens//8+1)): clear_torch_cache() reply = shared.model.generate(question, token_count=8, temperature=temperature, top_p=top_p)