From 9bd0724d85ef30cc2847bef5ceadb4de9a4ec101 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 31 Oct 2023 20:57:56 -0700 Subject: [PATCH] Change frequency/presence penalty ranges --- modules/ui_parameters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_parameters.py b/modules/ui_parameters.py index 2b63271a..ff0615ba 100644 --- a/modules/ui_parameters.py +++ b/modules/ui_parameters.py @@ -31,8 +31,8 @@ def create_ui(default_preset): shared.gradio['top_p'] = gr.Slider(0.0, 1.0, value=generate_params['top_p'], step=0.01, label='top_p') shared.gradio['top_k'] = gr.Slider(0, 200, value=generate_params['top_k'], step=1, label='top_k') shared.gradio['repetition_penalty'] = gr.Slider(1.0, 1.5, value=generate_params['repetition_penalty'], step=0.01, label='repetition_penalty') - shared.gradio['presence_penalty'] = gr.Slider(0, 4, value=generate_params['presence_penalty'], step=0.05, label='presence_penalty') - shared.gradio['frequency_penalty'] = gr.Slider(0, 2, value=generate_params['frequency_penalty'], step=0.05, label='frequency_penalty') + shared.gradio['presence_penalty'] = gr.Slider(-2, 2, value=generate_params['presence_penalty'], step=0.05, label='presence_penalty') + shared.gradio['frequency_penalty'] = gr.Slider(-2, 2, value=generate_params['frequency_penalty'], step=0.05, label='frequency_penalty') shared.gradio['repetition_penalty_range'] = gr.Slider(0, 4096, step=64, value=generate_params['repetition_penalty_range'], label='repetition_penalty_range') shared.gradio['typical_p'] = gr.Slider(0.0, 1.0, value=generate_params['typical_p'], step=0.01, label='typical_p') shared.gradio['tfs'] = gr.Slider(0.0, 1.0, value=generate_params['tfs'], step=0.01, label='tfs')