mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Add a simple min_p preset, make it the default (#5836)
This commit is contained in:
parent
ed4001e324
commit
cbd65ba767
@ -36,7 +36,7 @@ settings = {
|
||||
'chat_style': 'cai-chat',
|
||||
'prompt-default': 'QA',
|
||||
'prompt-notebook': 'QA',
|
||||
'preset': 'simple-1',
|
||||
'preset': 'min_p',
|
||||
'max_new_tokens': 512,
|
||||
'max_new_tokens_min': 1,
|
||||
'max_new_tokens_max': 4096,
|
||||
|
@ -32,6 +32,7 @@ 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['typical_p'] = gr.Slider(0.0, 1.0, value=generate_params['typical_p'], step=0.01, label='typical_p')
|
||||
shared.gradio['min_p'] = gr.Slider(0.0, 1.0, value=generate_params['min_p'], step=0.01, label='min_p')
|
||||
shared.gradio['repetition_penalty'] = gr.Slider(1.0, 1.5, value=generate_params['repetition_penalty'], step=0.01, label='repetition_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(0, 2, value=generate_params['presence_penalty'], step=0.05, label='presence_penalty')
|
||||
@ -69,7 +70,6 @@ def create_ui(default_preset):
|
||||
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
shared.gradio['min_p'] = gr.Slider(0.0, 1.0, value=generate_params['min_p'], step=0.01, label='min_p')
|
||||
shared.gradio['tfs'] = gr.Slider(0.0, 1.0, value=generate_params['tfs'], step=0.01, label='tfs')
|
||||
shared.gradio['top_a'] = gr.Slider(0.0, 1.0, value=generate_params['top_a'], step=0.01, label='top_a')
|
||||
shared.gradio['smoothing_factor'] = gr.Slider(0.0, 10.0, value=generate_params['smoothing_factor'], step=0.01, label='smoothing_factor', info='Activates Quadratic Sampling.')
|
||||
|
1
presets/min_p.yaml
Normal file
1
presets/min_p.yaml
Normal file
@ -0,0 +1 @@
|
||||
min_p: 0.05
|
@ -5,7 +5,7 @@ mode: chat
|
||||
chat_style: cai-chat
|
||||
prompt-default: QA
|
||||
prompt-notebook: QA
|
||||
preset: simple-1
|
||||
preset: min_p
|
||||
max_new_tokens: 512
|
||||
max_new_tokens_min: 1
|
||||
max_new_tokens_max: 4096
|
||||
|
Loading…
Reference in New Issue
Block a user