diff --git a/modules/text_generation.py b/modules/text_generation.py index cc8b62d4..1324c8b8 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -86,11 +86,11 @@ def generate_reply(question, max_new_tokens, do_sample, temperature, top_p, typi if shared.is_RWKV: if shared.args.no_stream: - reply = shared.model.generate(question, token_count=max_new_tokens, temperature=temperature) + reply = shared.model.generate(question, token_count=max_new_tokens, temperature=temperature, top_p=top_p) yield formatted_outputs(reply, None) else: for i in range(max_new_tokens//8): - reply = shared.model.generate(question, token_count=8, temperature=temperature) + reply = shared.model.generate(question, token_count=8, temperature=temperature, top_p=top_p) yield formatted_outputs(reply, None) question = reply return formatted_outputs(reply, None)