mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Reorganize the sliders some more
This commit is contained in:
parent
6b9ac2f88e
commit
0dd41e4830
@ -26,7 +26,6 @@ css = """
|
|||||||
min-height: 0
|
min-height: 0
|
||||||
}
|
}
|
||||||
#accordion {
|
#accordion {
|
||||||
background-color: transparent;
|
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
26
server.py
26
server.py
@ -462,23 +462,25 @@ def create_settings_menus():
|
|||||||
|
|
||||||
with gr.Accordion("Custom generation parameters", open=False, elem_id="accordion"):
|
with gr.Accordion("Custom generation parameters", open=False, elem_id="accordion"):
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
with gr.Column():
|
do_sample = gr.Checkbox(value=generate_params['do_sample'], label="do_sample")
|
||||||
do_sample = gr.Checkbox(value=generate_params['do_sample'], label="do_sample")
|
temperature = gr.Slider(0.01, 1.99, value=generate_params['temperature'], step=0.01, label="temperature")
|
||||||
temperature = gr.Slider(0.01, 1.99, value=generate_params['temperature'], step=0.01, label="temperature")
|
with gr.Row():
|
||||||
top_p = gr.Slider(0.0,1.0,value=generate_params['top_p'],step=0.01,label="top_p")
|
top_k = gr.Slider(0,200,value=generate_params['top_k'],step=1,label="top_k")
|
||||||
typical_p = gr.Slider(0.0,1.0,value=generate_params['typical_p'],step=0.01,label="typical_p")
|
top_p = gr.Slider(0.0,1.0,value=generate_params['top_p'],step=0.01,label="top_p")
|
||||||
with gr.Column():
|
with gr.Row():
|
||||||
top_k = gr.Slider(0,200,value=generate_params['top_k'],step=1,label="top_k")
|
repetition_penalty = gr.Slider(1.0,4.99,value=generate_params['repetition_penalty'],step=0.01,label="repetition_penalty")
|
||||||
repetition_penalty = gr.Slider(1.0,4.99,value=generate_params['repetition_penalty'],step=0.01,label="repetition_penalty")
|
no_repeat_ngram_size = gr.Slider(0, 20, step=1, value=generate_params["no_repeat_ngram_size"], label="no_repeat_ngram_size")
|
||||||
no_repeat_ngram_size = gr.Slider(0, 20, step=1, value=generate_params["no_repeat_ngram_size"], label="no_repeat_ngram_size")
|
with gr.Row():
|
||||||
min_length = gr.Slider(0, 2000, step=1, value=generate_params["min_length"] if args.no_stream else 0, label="min_length", interactive=args.no_stream)
|
typical_p = gr.Slider(0.0,1.0,value=generate_params['typical_p'],step=0.01,label="typical_p")
|
||||||
|
min_length = gr.Slider(0, 2000, step=1, value=generate_params["min_length"] if args.no_stream else 0, label="min_length", interactive=args.no_stream)
|
||||||
|
|
||||||
gr.Markdown("Contrastive search:")
|
gr.Markdown("Contrastive search:")
|
||||||
penalty_alpha = gr.Slider(0, 5, value=generate_params["penalty_alpha"], label="penalty_alpha")
|
penalty_alpha = gr.Slider(0, 5, value=generate_params["penalty_alpha"], label="penalty_alpha")
|
||||||
|
|
||||||
gr.Markdown("Beam search (uses a lot of VRAM):")
|
gr.Markdown("Beam search (uses a lot of VRAM):")
|
||||||
num_beams = gr.Slider(1, 20, step=1, value=generate_params["num_beams"], label="num_beams")
|
with gr.Row():
|
||||||
length_penalty = gr.Slider(-5, 5, value=generate_params["length_penalty"], label="length_penalty")
|
num_beams = gr.Slider(1, 20, step=1, value=generate_params["num_beams"], label="num_beams")
|
||||||
|
length_penalty = gr.Slider(-5, 5, value=generate_params["length_penalty"], label="length_penalty")
|
||||||
early_stopping = gr.Checkbox(value=generate_params["early_stopping"], label="early_stopping")
|
early_stopping = gr.Checkbox(value=generate_params["early_stopping"], label="early_stopping")
|
||||||
|
|
||||||
with gr.Accordion("Soft prompt", open=False, elem_id="accordion"):
|
with gr.Accordion("Soft prompt", open=False, elem_id="accordion"):
|
||||||
|
Loading…
Reference in New Issue
Block a user