shared.gradio['filter_by_loader']=gr.Dropdown(label="Filter by loader",choices=["All"]+list(loaders.loaders_and_params.keys()),value="All",elem_classes='slim-dropdown')
shared.gradio['guidance_scale']=gr.Slider(-0.5,2.5,step=0.05,value=generate_params['guidance_scale'],label='guidance_scale',info='For CFG. 1.5 is a good value.')
shared.gradio['penalty_alpha']=gr.Slider(0,5,value=generate_params['penalty_alpha'],label='penalty_alpha',info='For Contrastive Search. do_sample must be unchecked.')
shared.gradio['mirostat_mode']=gr.Slider(0,2,step=1,value=generate_params['mirostat_mode'],label='mirostat_mode',info='mode=1 is for llama.cpp only.')
shared.gradio['smoothing_curve']=gr.Slider(1.0,10.0,value=generate_params['smoothing_curve'],step=0.01,label='smoothing_curve',info='Adjusts the dropoff curve of Quadratic Sampling.')
shared.gradio['temperature_last']=gr.Checkbox(value=generate_params['temperature_last'],label='temperature_last',info='Moves temperature/dynamic temperature/quadratic sampling to the end of the sampler stack, ignoring their positions in "Sampler priority".')
shared.gradio['num_beams']=gr.Slider(1,20,step=1,value=generate_params['num_beams'],label='num_beams',info='For Beam Search, along with length_penalty and early_stopping.')
shared.gradio['truncation_length']=gr.Slider(value=get_truncation_length(),minimum=shared.settings['truncation_length_min'],maximum=shared.settings['truncation_length_max'],step=256,label='Truncate the prompt up to this length',info='The leftmost tokens are removed if the prompt exceeds this length. Most models require this to be at most 2048.')
shared.gradio['max_tokens_second']=gr.Slider(value=shared.settings['max_tokens_second'],minimum=0,maximum=20,step=1,label='Maximum tokens/second',info='To make text readable in real time.')
shared.gradio['custom_stopping_strings']=gr.Textbox(lines=1,value=shared.settings["custom_stopping_strings"]orNone,label='Custom stopping strings',info='In addition to the defaults. Written between "" and separated by commas.',placeholder='"\\n", "\\nYou:"')
shared.gradio['custom_token_bans']=gr.Textbox(value=shared.settings['custom_token_bans']orNone,label='Custom token bans',info='Specific token IDs to ban from generating, comma-separated. The IDs can be found in the Default or Notebook tab.')
withgr.Column():
shared.gradio['auto_max_new_tokens']=gr.Checkbox(value=shared.settings['auto_max_new_tokens'],label='auto_max_new_tokens',info='Expand max_new_tokens to the available context length.')
shared.gradio['ban_eos_token']=gr.Checkbox(value=shared.settings['ban_eos_token'],label='Ban the eos_token',info='Forces the model to never end the generation prematurely.')
shared.gradio['add_bos_token']=gr.Checkbox(value=shared.settings['add_bos_token'],label='Add the bos_token to the beginning of prompts',info='Disabling this can make the replies more creative.')
shared.gradio['skip_special_tokens']=gr.Checkbox(value=shared.settings['skip_special_tokens'],label='Skip special tokens',info='Some specific models need this unset.')
shared.gradio['stream']=gr.Checkbox(value=shared.settings['stream'],label='Activate text streaming')
shared.gradio['sampler_priority']=gr.Textbox(value=generate_params['sampler_priority'],lines=12,label='Sampler priority',info='Parameter names separated by new lines or commas.')
shared.gradio['grammar_file']=gr.Dropdown(value='None',choices=utils.get_available_grammars(),label='Load grammar from file (.gbnf)',elem_classes='slim-dropdown')