mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-01-28 21:07:17 +01:00
Update settings-template.yaml, organize modules/shared.py
This commit is contained in:
parent
83c426e96b
commit
c393f7650d
@ -40,8 +40,6 @@ settings = {
|
|||||||
'name1': 'You',
|
'name1': 'You',
|
||||||
'user_bio': '',
|
'user_bio': '',
|
||||||
'custom_system_message': '',
|
'custom_system_message': '',
|
||||||
'instruction_template_str': "{%- set ns = namespace(found=false) -%}\n{%- for message in messages -%}\n {%- if message['role'] == 'system' -%}\n {%- set ns.found = true -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if not ns.found -%}\n {{- '' + 'Below is an instruction that describes a task. Write a response that appropriately completes the request.' + '\\n\\n' -}}\n{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' -%}\n {{- '' + message['content'] + '\\n\\n' -}}\n {%- else -%}\n {%- if message['role'] == 'user' -%}\n {{-'### Instruction:\\n' + message['content'] + '\\n\\n'-}}\n {%- else -%}\n {{-'### Response:\\n' + message['content'] + '\\n\\n' -}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{-'### Response:\\n'-}}\n{%- endif -%}",
|
|
||||||
'chat_template_str': "{%- for message in messages %}\n {%- if message['role'] == 'system' -%}\n {%- if message['content'] -%}\n {{- message['content'] + '\\n\\n' -}}\n {%- endif -%}\n {%- if user_bio -%}\n {{- user_bio + '\\n\\n' -}}\n {%- endif -%}\n {%- else -%}\n {%- if message['role'] == 'user' -%}\n {{- name1 + ': ' + message['content'] + '\\n'-}}\n {%- else -%}\n {{- name2 + ': ' + message['content'] + '\\n' -}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}",
|
|
||||||
'preset': 'min_p',
|
'preset': 'min_p',
|
||||||
'max_new_tokens': 512,
|
'max_new_tokens': 512,
|
||||||
'max_new_tokens_min': 1,
|
'max_new_tokens_min': 1,
|
||||||
@ -63,6 +61,8 @@ settings = {
|
|||||||
'autoload_model': False,
|
'autoload_model': False,
|
||||||
'dark_theme': True,
|
'dark_theme': True,
|
||||||
'default_extensions': [],
|
'default_extensions': [],
|
||||||
|
'instruction_template_str': "{%- set ns = namespace(found=false) -%}\n{%- for message in messages -%}\n {%- if message['role'] == 'system' -%}\n {%- set ns.found = true -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if not ns.found -%}\n {{- '' + 'Below is an instruction that describes a task. Write a response that appropriately completes the request.' + '\\n\\n' -}}\n{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' -%}\n {{- '' + message['content'] + '\\n\\n' -}}\n {%- else -%}\n {%- if message['role'] == 'user' -%}\n {{-'### Instruction:\\n' + message['content'] + '\\n\\n'-}}\n {%- else -%}\n {{-'### Response:\\n' + message['content'] + '\\n\\n' -}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{-'### Response:\\n'-}}\n{%- endif -%}",
|
||||||
|
'chat_template_str': "{%- for message in messages %}\n {%- if message['role'] == 'system' -%}\n {%- if message['content'] -%}\n {{- message['content'] + '\\n\\n' -}}\n {%- endif -%}\n {%- if user_bio -%}\n {{- user_bio + '\\n\\n' -}}\n {%- endif -%}\n {%- else -%}\n {%- if message['role'] == 'user' -%}\n {{- name1 + ': ' + message['content'] + '\\n'-}}\n {%- else -%}\n {{- name2 + ': ' + message['content'] + '\\n' -}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}",
|
||||||
}
|
}
|
||||||
|
|
||||||
default_settings = copy.deepcopy(settings)
|
default_settings = copy.deepcopy(settings)
|
||||||
|
@ -1,31 +1,38 @@
|
|||||||
dark_theme: true
|
|
||||||
show_controls: true
|
show_controls: true
|
||||||
start_with: ''
|
start_with: ''
|
||||||
mode: chat-instruct
|
mode: chat-instruct
|
||||||
chat_style: cai-chat
|
chat_style: cai-chat
|
||||||
|
chat-instruct_command: |-
|
||||||
|
Continue the chat dialogue below. Write a single reply for the character "<|character|>".
|
||||||
|
|
||||||
|
<|prompt|>
|
||||||
prompt-default: QA
|
prompt-default: QA
|
||||||
prompt-notebook: QA
|
prompt-notebook: QA
|
||||||
|
character: Assistant
|
||||||
|
name1: You
|
||||||
|
user_bio: ''
|
||||||
|
custom_system_message: ''
|
||||||
preset: min_p
|
preset: min_p
|
||||||
max_new_tokens: 512
|
max_new_tokens: 512
|
||||||
max_new_tokens_min: 1
|
max_new_tokens_min: 1
|
||||||
max_new_tokens_max: 4096
|
max_new_tokens_max: 4096
|
||||||
negative_prompt: ''
|
prompt_lookup_num_tokens: 0
|
||||||
seed: -1
|
|
||||||
truncation_length: 2048
|
|
||||||
max_tokens_second: 0
|
max_tokens_second: 0
|
||||||
max_updates_second: 0
|
max_updates_second: 0
|
||||||
prompt_lookup_num_tokens: 0
|
|
||||||
custom_stopping_strings: ''
|
|
||||||
custom_token_bans: ''
|
|
||||||
auto_max_new_tokens: false
|
auto_max_new_tokens: false
|
||||||
ban_eos_token: false
|
ban_eos_token: false
|
||||||
add_bos_token: true
|
add_bos_token: true
|
||||||
skip_special_tokens: true
|
skip_special_tokens: true
|
||||||
stream: true
|
stream: true
|
||||||
static_cache: false
|
static_cache: false
|
||||||
character: Assistant
|
truncation_length: 2048
|
||||||
name1: You
|
seed: -1
|
||||||
custom_system_message: ''
|
custom_stopping_strings: ''
|
||||||
|
custom_token_bans: ''
|
||||||
|
negative_prompt: ''
|
||||||
|
autoload_model: false
|
||||||
|
dark_theme: true
|
||||||
|
default_extensions: []
|
||||||
instruction_template_str: |-
|
instruction_template_str: |-
|
||||||
{%- set ns = namespace(found=false) -%}
|
{%- set ns = namespace(found=false) -%}
|
||||||
{%- for message in messages -%}
|
{%- for message in messages -%}
|
||||||
@ -67,11 +74,4 @@ chat_template_str: |-
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
chat-instruct_command: |-
|
|
||||||
Continue the chat dialogue below. Write a single reply for the character "<|character|>".
|
|
||||||
|
|
||||||
<|prompt|>
|
|
||||||
autoload_model: false
|
|
||||||
gallery-items_per_page: 50
|
|
||||||
gallery-open: false
|
|
||||||
default_extensions: []
|
|
||||||
|
Loading…
Reference in New Issue
Block a user