mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Merge branch 'oobabooga:main' into stt-extension
This commit is contained in:
commit
d5efc0659b
@ -187,8 +187,7 @@ For these two, please try commenting on an existing issue instead of creating a
|
|||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
- Gradio dropdown menu refresh button: https://github.com/AUTOMATIC1111/stable-diffusion-webui
|
||||||
|
- Verbose preset: Anonymous 4chan user.
|
||||||
- NovelAI and KoboldAI presets: https://github.com/KoboldAI/KoboldAI-Client/wiki/Settings-Presets
|
- NovelAI and KoboldAI presets: https://github.com/KoboldAI/KoboldAI-Client/wiki/Settings-Presets
|
||||||
- Pygmalion preset, code for early stopping in chat mode, code for some of the sliders, --chat mode colors: https://github.com/PygmalionAI/gradio-ui/
|
- Pygmalion preset, code for early stopping in chat mode, code for some of the sliders, --chat mode colors: https://github.com/PygmalionAI/gradio-ui/
|
||||||
- Verbose preset: Anonymous 4chan user.
|
|
||||||
- Instruct-Joi preset: https://huggingface.co/Rallio67/joi_12B_instruct_alpha
|
|
||||||
- Gradio dropdown menu refresh button: https://github.com/AUTOMATIC1111/stable-diffusion-webui
|
|
||||||
|
3
presets/Contrastive Search.txt
Normal file
3
presets/Contrastive Search.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
do_sample=False
|
||||||
|
penalty_alpha=0.6
|
||||||
|
top_k=4
|
@ -1,5 +0,0 @@
|
|||||||
top_p=0.95
|
|
||||||
temperature=0.5
|
|
||||||
penalty_alpha=0.6
|
|
||||||
top_k=4
|
|
||||||
repetition_penalty=1.03
|
|
@ -197,11 +197,12 @@ shared.model, shared.tokenizer = load_model(shared.model_name)
|
|||||||
gen_events = []
|
gen_events = []
|
||||||
default_preset = shared.settings['presets'][next((k for k in shared.settings['presets'] if re.match(k.lower(), shared.model_name.lower())), 'default')]
|
default_preset = shared.settings['presets'][next((k for k in shared.settings['presets'] if re.match(k.lower(), shared.model_name.lower())), 'default')]
|
||||||
default_text = shared.settings['prompts'][next((k for k in shared.settings['prompts'] if re.match(k.lower(), shared.model_name.lower())), 'default')]
|
default_text = shared.settings['prompts'][next((k for k in shared.settings['prompts'] if re.match(k.lower(), shared.model_name.lower())), 'default')]
|
||||||
|
title ='Text generation web UI'
|
||||||
description = '\n\n# Text generation lab\nGenerate text using Large Language Models.\n'
|
description = '\n\n# Text generation lab\nGenerate text using Large Language Models.\n'
|
||||||
suffix = '_pygmalion' if 'pygmalion' in shared.model_name.lower() else ''
|
suffix = '_pygmalion' if 'pygmalion' in shared.model_name.lower() else ''
|
||||||
|
|
||||||
if shared.args.chat or shared.args.cai_chat:
|
if shared.args.chat or shared.args.cai_chat:
|
||||||
with gr.Blocks(css=ui.css+ui.chat_css, analytics_enabled=False) as shared.gradio['interface']:
|
with gr.Blocks(css=ui.css+ui.chat_css, analytics_enabled=False, title=title) as shared.gradio['interface']:
|
||||||
if shared.args.cai_chat:
|
if shared.args.cai_chat:
|
||||||
shared.gradio['display'] = gr.HTML(value=generate_chat_html(shared.history['visible'], shared.settings[f'name1{suffix}'], shared.settings[f'name2{suffix}'], shared.character))
|
shared.gradio['display'] = gr.HTML(value=generate_chat_html(shared.history['visible'], shared.settings[f'name1{suffix}'], shared.settings[f'name2{suffix}'], shared.character))
|
||||||
else:
|
else:
|
||||||
@ -313,7 +314,7 @@ if shared.args.chat or shared.args.cai_chat:
|
|||||||
shared.gradio['interface'].load(reload_func, reload_inputs, [shared.gradio['display']], show_progress=True)
|
shared.gradio['interface'].load(reload_func, reload_inputs, [shared.gradio['display']], show_progress=True)
|
||||||
|
|
||||||
elif shared.args.notebook:
|
elif shared.args.notebook:
|
||||||
with gr.Blocks(css=ui.css, analytics_enabled=False) as shared.gradio['interface']:
|
with gr.Blocks(css=ui.css, analytics_enabled=False, title=title) as shared.gradio['interface']:
|
||||||
gr.Markdown(description)
|
gr.Markdown(description)
|
||||||
with gr.Tab('Raw'):
|
with gr.Tab('Raw'):
|
||||||
shared.gradio['textbox'] = gr.Textbox(value=default_text, lines=23)
|
shared.gradio['textbox'] = gr.Textbox(value=default_text, lines=23)
|
||||||
@ -337,7 +338,7 @@ elif shared.args.notebook:
|
|||||||
shared.gradio['Stop'].click(None, None, None, cancels=gen_events)
|
shared.gradio['Stop'].click(None, None, None, cancels=gen_events)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
with gr.Blocks(css=ui.css, analytics_enabled=False) as shared.gradio['interface']:
|
with gr.Blocks(css=ui.css, analytics_enabled=False, title=title) as shared.gradio['interface']:
|
||||||
gr.Markdown(description)
|
gr.Markdown(description)
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
|
Loading…
Reference in New Issue
Block a user