From 807a41cf87dc4c1cb22ad7d3548240e6da587401 Mon Sep 17 00:00:00 2001 From: jtang613 <> Date: Wed, 8 Mar 2023 21:02:25 -0500 Subject: [PATCH 1/4] Lets propose a name besides "Gradio" --- server.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 9f584ba327..877595cf2f 100644 --- a/server.py +++ b/server.py @@ -18,6 +18,8 @@ from modules.models import load_model, load_soft_prompt from modules.text_generation import generate_reply +PROJ_NAME='Oobabooga' + if (shared.args.chat or shared.args.cai_chat) and not shared.args.no_stream: print('Warning: chat mode currently becomes somewhat slower with text streaming on.\nConsider starting the web UI with the --no-stream option.\n') @@ -201,7 +203,7 @@ def create_settings_menus(default_preset): suffix = '_pygmalion' if 'pygmalion' in shared.model_name.lower() else '' 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=PROJ_NAME) as shared.gradio['interface']: 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)) else: @@ -313,7 +315,7 @@ def create_settings_menus(default_preset): shared.gradio['interface'].load(reload_func, reload_inputs, [shared.gradio['display']], show_progress=True) 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=PROJ_NAME) as shared.gradio['interface']: gr.Markdown(description) with gr.Tab('Raw'): shared.gradio['textbox'] = gr.Textbox(value=default_text, lines=23) @@ -337,7 +339,7 @@ def create_settings_menus(default_preset): shared.gradio['Stop'].click(None, None, None, cancels=gen_events) else: - with gr.Blocks(css=ui.css, analytics_enabled=False) as shared.gradio['interface']: + with gr.Blocks(css=ui.css, analytics_enabled=False, title=PROJ_NAME) as shared.gradio['interface']: gr.Markdown(description) with gr.Row(): with gr.Column(): From 038e90765bea63bcbcba4296813303c9fed6d374 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 9 Mar 2023 09:44:08 -0300 Subject: [PATCH 2/4] Rename to "Text generation web UI" --- server.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server.py b/server.py index 877595cf2f..7d8792b792 100644 --- a/server.py +++ b/server.py @@ -18,8 +18,6 @@ from modules.models import load_model, load_soft_prompt from modules.text_generation import generate_reply -PROJ_NAME='Oobabooga' - if (shared.args.chat or shared.args.cai_chat) and not shared.args.no_stream: print('Warning: chat mode currently becomes somewhat slower with text streaming on.\nConsider starting the web UI with the --no-stream option.\n') @@ -199,11 +197,12 @@ def create_settings_menus(default_preset): 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_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' suffix = '_pygmalion' if 'pygmalion' in shared.model_name.lower() else '' if shared.args.chat or shared.args.cai_chat: - with gr.Blocks(css=ui.css+ui.chat_css, analytics_enabled=False, title=PROJ_NAME) 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: 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: @@ -315,7 +314,7 @@ def create_settings_menus(default_preset): shared.gradio['interface'].load(reload_func, reload_inputs, [shared.gradio['display']], show_progress=True) elif shared.args.notebook: - with gr.Blocks(css=ui.css, analytics_enabled=False, title=PROJ_NAME) as shared.gradio['interface']: + with gr.Blocks(css=ui.css, analytics_enabled=False, title=title) as shared.gradio['interface']: gr.Markdown(description) with gr.Tab('Raw'): shared.gradio['textbox'] = gr.Textbox(value=default_text, lines=23) @@ -339,7 +338,7 @@ def create_settings_menus(default_preset): shared.gradio['Stop'].click(None, None, None, cancels=gen_events) else: - with gr.Blocks(css=ui.css, analytics_enabled=False, title=PROJ_NAME) as shared.gradio['interface']: + with gr.Blocks(css=ui.css, analytics_enabled=False, title=title) as shared.gradio['interface']: gr.Markdown(description) with gr.Row(): with gr.Column(): From e7adf5fe4efb586a7e9c9dd2c1a4e7faecb004ba Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 9 Mar 2023 10:27:11 -0300 Subject: [PATCH 3/4] Add Contrastive Search preset #197 --- README.md | 1 - presets/Contrastive Search.txt | 3 +++ presets/Instruct Joi (Contrastive Search).txt | 5 ----- 3 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 presets/Contrastive Search.txt delete mode 100644 presets/Instruct Joi (Contrastive Search).txt diff --git a/README.md b/README.md index 9efacb7c3d..62e8d725eb 100644 --- a/README.md +++ b/README.md @@ -190,5 +190,4 @@ For these two, please try commenting on an existing issue instead of creating a - 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/ - 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 diff --git a/presets/Contrastive Search.txt b/presets/Contrastive Search.txt new file mode 100644 index 0000000000..832bc9caf9 --- /dev/null +++ b/presets/Contrastive Search.txt @@ -0,0 +1,3 @@ +do_sample=False +penalty_alpha=0.6 +top_k=4 diff --git a/presets/Instruct Joi (Contrastive Search).txt b/presets/Instruct Joi (Contrastive Search).txt deleted file mode 100644 index e17f0a66ab..0000000000 --- a/presets/Instruct Joi (Contrastive Search).txt +++ /dev/null @@ -1,5 +0,0 @@ -top_p=0.95 -temperature=0.5 -penalty_alpha=0.6 -top_k=4 -repetition_penalty=1.03 From 33414478bff6ccb99e4bceedae1510a13bf29936 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 9 Mar 2023 11:13:03 -0300 Subject: [PATCH 4/4] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 62e8d725eb..655963210f 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ For these two, please try commenting on an existing issue instead of creating a ## 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 - 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. -- Gradio dropdown menu refresh button: https://github.com/AUTOMATIC1111/stable-diffusion-webui