From 58b07cca81c4eb01efe78fe01ad058102bc47a3b Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 7 Feb 2023 23:33:02 -0300 Subject: [PATCH] length_penalty can be negative (apparently) --- server.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server.py b/server.py index 90ee8cf..5338844 100644 --- a/server.py +++ b/server.py @@ -274,8 +274,6 @@ def generate_reply(question, tokens, do_sample, max_new_tokens, temperature, top f"early_stopping={early_stopping}", ] - print(generate_params) - if args.deepspeed: generate_params.append("synced_gpus=True") if args.no_stream: @@ -395,7 +393,7 @@ def create_settings_menus(): with gr.Row(): with gr.Column(): num_beams = gr.Slider(0, 20, step=1, value=defaults["num_beams"], label="num_beams") - length_penalty = gr.Slider(0, 5, value=defaults["length_penalty"], label="length_penalty") + length_penalty = gr.Slider(-5, 5, value=defaults["length_penalty"], label="length_penalty") with gr.Column(): min_length = gr.Slider(0, 2000, step=1, value=defaults["min_length"] if args.no_stream else 0, label="min_length", interactive=args.no_stream) early_stopping = gr.Checkbox(value=defaults["early_stopping"], label="early_stopping")