mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-01 18:37:41 +01:00
Merge branch 'staging' into sysprompt-divorce
This commit is contained in:
commit
e122dd2d7a
@ -507,10 +507,6 @@
|
||||
"filename": "presets/context/Minimalist.json",
|
||||
"type": "context"
|
||||
},
|
||||
{
|
||||
"filename": "presets/context/Mistral.json",
|
||||
"type": "context"
|
||||
},
|
||||
{
|
||||
"filename": "presets/context/NovelAI.json",
|
||||
"type": "context"
|
||||
@ -591,10 +587,6 @@
|
||||
"filename": "presets/instruct/Metharme.json",
|
||||
"type": "instruct"
|
||||
},
|
||||
{
|
||||
"filename": "presets/instruct/Mistral.json",
|
||||
"type": "instruct"
|
||||
},
|
||||
{
|
||||
"filename": "presets/instruct/OpenOrca-OpenChat.json",
|
||||
"type": "instruct"
|
||||
@ -726,5 +718,29 @@
|
||||
{
|
||||
"filename": "presets/sysprompt/Neutral - Chat.json",
|
||||
"type": "sysprompt"
|
||||
},
|
||||
{
|
||||
"filename": "presets/instruct/Mistral V1.json",
|
||||
"type": "instruct"
|
||||
},
|
||||
{
|
||||
"filename": "presets/context/Mistral V1.json",
|
||||
"type": "context"
|
||||
},
|
||||
{
|
||||
"filename": "presets/instruct/Mistral V2 & V3.json",
|
||||
"type": "instruct"
|
||||
},
|
||||
{
|
||||
"filename": "presets/context/Mistral V2 & V3.json",
|
||||
"type": "context"
|
||||
},
|
||||
{
|
||||
"filename": "presets/instruct/Mistral V3-Tekken.json",
|
||||
"type": "instruct"
|
||||
},
|
||||
{
|
||||
"filename": "presets/context/Mistral V3-Tekken.json",
|
||||
"type": "context"
|
||||
}
|
||||
]
|
||||
|
12
default/content/presets/context/Mistral V1.json
Normal file
12
default/content/presets/context/Mistral V1.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"story_string": " [INST] {{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}} [/INST] Understood.</s>",
|
||||
"example_separator": "",
|
||||
"chat_start": "",
|
||||
"use_stop_strings": false,
|
||||
"allow_jailbreak": false,
|
||||
"always_force_name2": true,
|
||||
"trim_sentences": false,
|
||||
"include_newline": false,
|
||||
"single_line": false,
|
||||
"name": "Mistral V1"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"story_string": "[INST] {{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}} [/INST]",
|
||||
"example_separator": "Examples:",
|
||||
"story_string": "[INST] {{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}[/INST] Understood.</s>",
|
||||
"example_separator": "",
|
||||
"chat_start": "",
|
||||
"use_stop_strings": false,
|
||||
"allow_jailbreak": false,
|
||||
@ -8,5 +8,5 @@
|
||||
"trim_sentences": false,
|
||||
"include_newline": false,
|
||||
"single_line": false,
|
||||
"name": "Mistral"
|
||||
"name": "Mistral V2 & V3"
|
||||
}
|
12
default/content/presets/context/Mistral V3-Tekken.json
Normal file
12
default/content/presets/context/Mistral V3-Tekken.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"story_string": "[INST]{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}[/INST]Understood.</s>",
|
||||
"example_separator": "",
|
||||
"chat_start": "",
|
||||
"use_stop_strings": false,
|
||||
"allow_jailbreak": false,
|
||||
"always_force_name2": true,
|
||||
"trim_sentences": false,
|
||||
"include_newline": false,
|
||||
"single_line": false,
|
||||
"name": "Mistral V3-Tekken"
|
||||
}
|
22
default/content/presets/instruct/Mistral V1.json
Normal file
22
default/content/presets/instruct/Mistral V1.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"input_sequence": " [INST] ",
|
||||
"output_sequence": " [/INST] ",
|
||||
"last_output_sequence": " [/INST]",
|
||||
"system_sequence": "",
|
||||
"stop_sequence": "",
|
||||
"wrap": false,
|
||||
"macro": true,
|
||||
"names_behavior": "always",
|
||||
"activation_regex": "",
|
||||
"system_sequence_prefix": "",
|
||||
"system_sequence_suffix": "",
|
||||
"first_output_sequence": "",
|
||||
"skip_examples": false,
|
||||
"output_suffix": "</s>",
|
||||
"input_suffix": "",
|
||||
"system_suffix": "",
|
||||
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
|
||||
"system_same_as_user": true,
|
||||
"last_system_sequence": "",
|
||||
"name": "Mistral V1"
|
||||
}
|
22
default/content/presets/instruct/Mistral V2 & V3.json
Normal file
22
default/content/presets/instruct/Mistral V2 & V3.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"input_sequence": "[INST] ",
|
||||
"output_sequence": "[/INST] ",
|
||||
"last_output_sequence": "[/INST]",
|
||||
"system_sequence": "",
|
||||
"stop_sequence": "",
|
||||
"wrap": false,
|
||||
"macro": true,
|
||||
"names_behavior": "always",
|
||||
"activation_regex": "",
|
||||
"system_sequence_prefix": "",
|
||||
"system_sequence_suffix": "",
|
||||
"first_output_sequence": "",
|
||||
"skip_examples": false,
|
||||
"output_suffix": "</s>",
|
||||
"input_suffix": "",
|
||||
"system_suffix": "",
|
||||
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
|
||||
"system_same_as_user": true,
|
||||
"last_system_sequence": "",
|
||||
"name": "Mistral V2 & V3"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"input_sequence": "[INST] ",
|
||||
"output_sequence": "",
|
||||
"input_sequence": "[INST]",
|
||||
"output_sequence": "[/INST]",
|
||||
"last_output_sequence": "",
|
||||
"system_sequence": "",
|
||||
"stop_sequence": "",
|
||||
@ -12,11 +12,11 @@
|
||||
"system_sequence_suffix": "",
|
||||
"first_output_sequence": "",
|
||||
"skip_examples": false,
|
||||
"output_suffix": "\n",
|
||||
"input_suffix": " [/INST]\n",
|
||||
"output_suffix": "</s>",
|
||||
"input_suffix": "",
|
||||
"system_suffix": "",
|
||||
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
|
||||
"system_same_as_user": true,
|
||||
"last_system_sequence": "",
|
||||
"name": "Mistral"
|
||||
"name": "Mistral V3-Tekken"
|
||||
}
|
@ -16,5 +16,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "medium",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -15,5 +15,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "medium",
|
||||
"cfg_scale": 1.55,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -16,5 +16,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "very_aggressive",
|
||||
"cfg_scale": 1.3,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -17,5 +17,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "aggressive",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -16,5 +16,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "off",
|
||||
"cfg_scale": 1.48,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -17,5 +17,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "very_light",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -18,5 +18,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "very_light",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -16,5 +16,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "off",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -16,5 +16,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "very_aggressive",
|
||||
"cfg_scale": 1.4,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -18,5 +18,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "very_light",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -18,5 +18,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "very_light",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -18,5 +18,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "medium",
|
||||
"cfg_scale": 1.35,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -16,5 +16,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "medium",
|
||||
"cfg_scale": 1.0,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -13,5 +13,9 @@
|
||||
"return_full_text": false,
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "medium",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -18,5 +18,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "very_light",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -15,5 +15,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "aggressive",
|
||||
"cfg_scale": 1.0,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -14,5 +14,9 @@
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "aggressive",
|
||||
"cfg_scale": 1.3,
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -18,5 +18,9 @@
|
||||
"prefix": "vanilla",
|
||||
"cfg_scale": 1,
|
||||
"phrase_rep_pen": "very_light",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -17,5 +17,9 @@
|
||||
"return_full_text": false,
|
||||
"prefix": "vanilla",
|
||||
"phrase_rep_pen": "very_aggressive",
|
||||
"max_context": 7800
|
||||
"max_context": 7800,
|
||||
"min_p": 0,
|
||||
"math1_temp": 1,
|
||||
"math1_quad": 0,
|
||||
"math1_quad_entropy_scale": 0
|
||||
}
|
||||
|
@ -323,6 +323,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Min P">
|
||||
Min P
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="min_p_novel" name="volume" min="0" max="1" step="0.001">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.001" data-for="min_p_novel" id="min_p_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="TFS">
|
||||
TFS
|
||||
@ -336,6 +349,136 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Top P">
|
||||
Top P
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="top_p_novel" name="volume" min="0" max="1" step="0.001">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.001" data-for="top_p_novel" id="top_p_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Top A">
|
||||
Top A
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="top_a_novel" name="volume" min="0" max="1" step="0.001">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.001" data-for="top_a_novel" id="top_a_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Top K">
|
||||
Top K
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="top_k_novel" name="volume" min="0" max="300" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="300" step="1" data-for="top_k_novel" id="top_k_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Mirostat Tau">
|
||||
Mirostat Tau
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="mirostat_tau_novel" name="volume" min="0" max="6" step="0.01">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="6" step="0.01" data-for="mirostat_tau_novel" id="mirostat_tau_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Mirostat LR">
|
||||
Mirostat LR
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="mirostat_lr_novel" name="volume" min="0" max="1" step="0.01">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.01" data-for="mirostat_lr_novel" id="mirostat_lr_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Typical P">
|
||||
Typical P
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="typical_p_novel" name="volume" min="0" max="1" step="0.001">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.001" data-for="typical_p_novel" id="typical_p_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Linear">
|
||||
Linear
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="math1_temp_novel" name="volume" min="0" max="1.5" step="0.01">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1.5" step="0.01" data-for="math1_temp_novel" id="math1_temp_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Quad">
|
||||
Quad
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="math1_quad_novel" name="volume" min="0" max="0.4" step="0.01">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="0.4" step="0.01" data-for="math1_quad_novel" id="math1_quad_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Conf">
|
||||
Conf
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="math1_quad_entropy_scale_novel" name="volume" min="-0.4" max="0.4" step="0.01">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="-0.4" max="0.4" step="0.01" data-for="math1_quad_entropy_scale_novel" id="math1_quad_entropy_scale_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Min Length">
|
||||
Min Length
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="min_length_novel" name="volume" min="1" max="150" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="1" max="150" step="1" data-for="min_length_novel" id="min_length_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Phrase Repetition Penalty">
|
||||
Phrase Repetition Penalty
|
||||
@ -349,6 +492,72 @@
|
||||
<option value="very_aggressive" data-i18n="Very aggressive">Very aggressive</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title openai_restorable">
|
||||
<span data-i18n="Preamble">Preamble</span>
|
||||
<div id="nai_preamble_restore" title="Restore default prompt" data-i18n="[title]Restore default prompt" class="right_menu_button">
|
||||
<div class="fa-solid fa-clock-rotate-left "></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle-description justifyLeft" data-i18n="Use style tags to modify the writing style of the output.">
|
||||
Use style tags to modify the writing style of the output.
|
||||
</div>
|
||||
<div class="wide100p">
|
||||
<textarea id="nai_preamble_textarea" class="text_pole textarea_compact" name="nai_preamble" rows="2" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title justifyLeft">
|
||||
<span data-i18n="Banned Tokens">Banned Tokens</span>
|
||||
</div>
|
||||
<div class="toggle-description justifyLeft" data-i18n="Sequences you don't want to appear in the output. One per line.">
|
||||
Sequences you don't want to appear in the output. One per line. Text or [token ids].
|
||||
</div>
|
||||
<div class="wide100p">
|
||||
<textarea id="nai_banned_tokens" class="text_pole textarea_compact" name="nai_banned_tokens" rows="3" placeholder="Example: some text [42, 69, 1337]"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div id="logit_bias_novel" class="range-block-title title_restorable">
|
||||
<span data-i18n="Logit Bias">Logit Bias</span>
|
||||
<div id="novelai_logit_bias_new_entry" class="menu_button menu_button_icon">
|
||||
<i class="fa-xs fa-solid fa-plus"></i>
|
||||
<small data-i18n="Add">Add</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle-description justifyLeft" data-i18n="Helps to ban or reenforce the usage of certain words">
|
||||
Helps to ban or reinforce the usage of certain tokens.
|
||||
</div>
|
||||
<div class="flex-container flexFlowColumn wide100p">
|
||||
<div class="logit_bias_list"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<hr>
|
||||
<div class="range-block-title justifyLeft" data-i18n="CFG Scale">
|
||||
CFG Scale
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="cfg_scale_novel" name="volume" min="1" max="3" step="0.05">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="1" max="3" step="0.05" data-for="cfg_scale_novel" id="cfg_scale_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title justifyLeft">
|
||||
<span data-i18n="Negative Prompt">Negative Prompt</span>
|
||||
</div>
|
||||
<div class="wide100p">
|
||||
<textarea id="nai_cfg_uc" class="text_pole textarea_compact" name="cfg_uc" rows="2" data-i18n="[placeholder]Add text here that would make the AI generate things you don't want in your outputs." placeholder="Add text here that would make the AI generate things you don't want in your outputs."></textarea>
|
||||
</div>
|
||||
<small class="margin-bot-10px" data-i18n="Used if CFG Scale is unset globally, per chat or character">
|
||||
Used if CFG Scale is unset globally, per chat or character
|
||||
</small>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
<div id="range_block_openai">
|
||||
<div class="range-block">
|
||||
@ -907,163 +1116,6 @@
|
||||
</div>
|
||||
</div><!-- end of kobold settings-->
|
||||
<div id="novel_api-settings">
|
||||
<div class="range-block">
|
||||
<div class="range-block-title openai_restorable">
|
||||
<span data-i18n="Preamble">Preamble</span>
|
||||
<div id="nai_preamble_restore" title="Restore default prompt" data-i18n="[title]Restore default prompt" class="right_menu_button">
|
||||
<div class="fa-solid fa-clock-rotate-left "></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle-description justifyLeft" data-i18n="Use style tags to modify the writing style of the output.">
|
||||
Use style tags to modify the writing style of the output.
|
||||
</div>
|
||||
<div class="wide100p">
|
||||
<textarea id="nai_preamble_textarea" class="text_pole textarea_compact" name="nai_preamble" rows="2" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title justifyLeft">
|
||||
<span data-i18n="Banned Tokens">Banned Tokens</span>
|
||||
</div>
|
||||
<div class="toggle-description justifyLeft" data-i18n="Sequences you don't want to appear in the output. One per line.">
|
||||
Sequences you don't want to appear in the output. One per line. Text or [token ids].
|
||||
</div>
|
||||
<div class="wide100p">
|
||||
<textarea id="nai_banned_tokens" class="text_pole textarea_compact" name="nai_banned_tokens" rows="3" placeholder="Example: some text [42, 69, 1337]"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div id="logit_bias_novel" class="range-block-title title_restorable">
|
||||
<span data-i18n="Logit Bias">Logit Bias</span>
|
||||
<div id="novelai_logit_bias_new_entry" class="menu_button menu_button_icon">
|
||||
<i class="fa-xs fa-solid fa-plus"></i>
|
||||
<small data-i18n="Add">Add</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle-description justifyLeft" data-i18n="Helps to ban or reenforce the usage of certain words">
|
||||
Helps to ban or reinforce the usage of certain tokens.
|
||||
</div>
|
||||
<div class="flex-container flexFlowColumn wide100p">
|
||||
<div class="logit_bias_list"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<hr>
|
||||
<div class="range-block-title justifyLeft" data-i18n="CFG Scale">
|
||||
CFG Scale
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="cfg_scale_novel" name="volume" min="1" max="3" step="0.05">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="1" max="3" step="0.05" data-for="cfg_scale_novel" id="cfg_scale_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title justifyLeft">
|
||||
<span data-i18n="Negative Prompt">Negative Prompt</span>
|
||||
</div>
|
||||
<div class="wide100p">
|
||||
<textarea id="nai_cfg_uc" class="text_pole textarea_compact" name="cfg_uc" rows="2" data-i18n="[placeholder]Add text here that would make the AI generate things you don't want in your outputs." placeholder="Add text here that would make the AI generate things you don't want in your outputs."></textarea>
|
||||
</div>
|
||||
<small class="margin-bot-10px" data-i18n="Used if CFG Scale is unset globally, per chat or character">
|
||||
Used if CFG Scale is unset globally, per chat or character
|
||||
</small>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Top P">
|
||||
Top P
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="top_p_novel" name="volume" min="0" max="1" step="0.001">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.001" data-for="top_p_novel" id="top_p_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Top A">
|
||||
Top A
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="top_a_novel" name="volume" min="0" max="1" step="0.001">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.001" data-for="top_a_novel" id="top_a_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Top K">
|
||||
Top K
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="top_k_novel" name="volume" min="0" max="300" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="300" step="1" data-for="top_k_novel" id="top_k_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Mirostat Tau">
|
||||
Mirostat Tau
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="mirostat_tau_novel" name="volume" min="0" max="6" step="0.01">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="6" step="0.01" data-for="mirostat_tau_novel" id="mirostat_tau_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Mirostat LR">
|
||||
Mirostat LR
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="mirostat_lr_novel" name="volume" min="0" max="1" step="0.01">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.01" data-for="mirostat_lr_novel" id="mirostat_lr_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Typical P">
|
||||
Typical P
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="typical_p_novel" name="volume" min="0" max="1" step="0.001">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="0" max="1" step="0.001" data-for="typical_p_novel" id="typical_p_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<div class="range-block-title" data-i18n="Min Length">
|
||||
Min Length
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="min_length_novel" name="volume" min="1" max="150" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<input type="number" min="1" max="150" step="1" data-for="min_length_novel" id="min_length_counter_novel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block flexFlowColumn">
|
||||
<div class="range-block-title">
|
||||
<span data-i18n="Samplers Order">Samplers Order</span>
|
||||
@ -1113,6 +1165,16 @@
|
||||
<small>8</small>
|
||||
<div class="toggle_button right_menu_button"></div>
|
||||
</div>
|
||||
<div data-id="9">
|
||||
<span data-i18n="Unified Sampling">Unified Sampling</span>
|
||||
<small>9</small>
|
||||
<div class="toggle_button right_menu_button"></div>
|
||||
</div>
|
||||
<div data-id="10">
|
||||
<span data-i18n="Min P">Min P</span>
|
||||
<small>10</small>
|
||||
<div class="toggle_button right_menu_button"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end of novel settings-->
|
||||
|
@ -531,6 +531,19 @@ export function formatInstructModePrompt(name, isImpersonate, promptBias, name1,
|
||||
}
|
||||
|
||||
let sequence = getSequence() || '';
|
||||
let nameFiller = '';
|
||||
|
||||
// A hack for Mistral's formatting that has a normal output sequence ending with a space
|
||||
if (
|
||||
includeNames &&
|
||||
power_user.instruct.last_output_sequence &&
|
||||
power_user.instruct.output_sequence &&
|
||||
sequence === power_user.instruct.last_output_sequence &&
|
||||
/\s$/.test(power_user.instruct.output_sequence) &&
|
||||
!/\s$/.test(power_user.instruct.last_output_sequence)
|
||||
) {
|
||||
nameFiller = power_user.instruct.output_sequence.slice(-1);
|
||||
}
|
||||
|
||||
if (power_user.instruct.macro) {
|
||||
sequence = substituteParams(sequence, name1, name2);
|
||||
@ -538,7 +551,7 @@ export function formatInstructModePrompt(name, isImpersonate, promptBias, name1,
|
||||
}
|
||||
|
||||
const separator = power_user.instruct.wrap ? '\n' : '';
|
||||
let text = includeNames ? (separator + sequence + separator + `${name}:`) : (separator + sequence);
|
||||
let text = includeNames ? (separator + sequence + separator + nameFiller + `${name}:`) : (separator + sequence);
|
||||
|
||||
// Quiet prompt already has a newline at the end
|
||||
if (isQuiet && separator) {
|
||||
|
@ -38,6 +38,10 @@ export const nai_settings = {
|
||||
top_p: 0.75,
|
||||
top_a: 0.08,
|
||||
typical_p: 0.975,
|
||||
min_p: 0,
|
||||
math1_temp: 1,
|
||||
math1_quad: 0,
|
||||
math1_quad_entropy_scale: 0,
|
||||
min_length: 1,
|
||||
model_novel: 'clio-v1',
|
||||
preset_settings_novel: 'Talker-Chat-Clio',
|
||||
@ -151,6 +155,10 @@ export function loadNovelPreset(preset) {
|
||||
nai_settings.order = preset.order || default_order;
|
||||
nai_settings.logit_bias = preset.logit_bias || [];
|
||||
nai_settings.preamble = preset.preamble || default_preamble;
|
||||
nai_settings.min_p = preset.min_p || 0;
|
||||
nai_settings.math1_temp = preset.math1_temp || 1;
|
||||
nai_settings.math1_quad = preset.math1_quad || 0;
|
||||
nai_settings.math1_quad_entropy_scale = preset.math1_quad_entropy_scale || 0;
|
||||
loadNovelSettingsUi(nai_settings);
|
||||
}
|
||||
|
||||
@ -188,6 +196,10 @@ export function loadNovelSettings(settings) {
|
||||
nai_settings.banned_tokens = settings.banned_tokens || '';
|
||||
nai_settings.order = settings.order || default_order;
|
||||
nai_settings.logit_bias = settings.logit_bias || [];
|
||||
nai_settings.min_p = settings.min_p || 0;
|
||||
nai_settings.math1_temp = settings.math1_temp || 1;
|
||||
nai_settings.math1_quad = settings.math1_quad || 0;
|
||||
nai_settings.math1_quad_entropy_scale = settings.math1_quad_entropy_scale || 0;
|
||||
loadNovelSettingsUi(nai_settings);
|
||||
}
|
||||
|
||||
@ -227,6 +239,14 @@ function loadNovelSettingsUi(ui_settings) {
|
||||
$('#nai_prefix').val(ui_settings.prefix || 'vanilla');
|
||||
$('#nai_cfg_uc').val(ui_settings.cfg_uc || '');
|
||||
$('#nai_banned_tokens').val(ui_settings.banned_tokens || '');
|
||||
$('#min_p_novel').val(ui_settings.min_p);
|
||||
$('#min_p_counter_novel').val(Number(ui_settings.min_p).toFixed(3));
|
||||
$('#math1_temp_novel').val(ui_settings.math1_temp);
|
||||
$('#math1_temp_counter_novel').val(Number(ui_settings.math1_temp).toFixed(2));
|
||||
$('#math1_quad_novel').val(ui_settings.math1_quad);
|
||||
$('#math1_quad_counter_novel').val(Number(ui_settings.math1_quad).toFixed(2));
|
||||
$('#math1_quad_entropy_scale_novel').val(ui_settings.math1_quad_entropy_scale);
|
||||
$('#math1_quad_entropy_scale_counter_novel').val(Number(ui_settings.math1_quad_entropy_scale).toFixed(2));
|
||||
|
||||
$('#streaming_novel').prop('checked', ui_settings.streaming_novel);
|
||||
sortItemsByOrder(ui_settings.order);
|
||||
@ -336,6 +356,30 @@ const sliders = [
|
||||
format: (val) => val,
|
||||
setValue: (val) => { nai_settings.banned_tokens = val; },
|
||||
},
|
||||
{
|
||||
sliderId: '#min_p_novel',
|
||||
counterId: '#min_p_counter_novel',
|
||||
format: (val) => Number(val).toFixed(3),
|
||||
setValue: (val) => { nai_settings.min_p = Number(val); },
|
||||
},
|
||||
{
|
||||
sliderId: '#math1_temp_novel',
|
||||
counterId: '#math1_temp_counter_novel',
|
||||
format: (val) => Number(val).toFixed(2),
|
||||
setValue: (val) => { nai_settings.math1_temp = Number(val); },
|
||||
},
|
||||
{
|
||||
sliderId: '#math1_quad_novel',
|
||||
counterId: '#math1_quad_counter_novel',
|
||||
format: (val) => Number(val).toFixed(2),
|
||||
setValue: (val) => { nai_settings.math1_quad = Number(val); },
|
||||
},
|
||||
{
|
||||
sliderId: '#math1_quad_entropy_scale_novel',
|
||||
counterId: '#math1_quad_entropy_scale_counter_novel',
|
||||
format: (val) => Number(val).toFixed(2),
|
||||
setValue: (val) => { nai_settings.math1_quad_entropy_scale = Number(val); },
|
||||
},
|
||||
];
|
||||
|
||||
function getBadWordIds(banned_tokens, tokenizerType) {
|
||||
@ -469,6 +513,10 @@ export function getNovelGenerationData(finalPrompt, settings, maxLength, isImper
|
||||
'top_a': Number(nai_settings.top_a),
|
||||
'top_p': Number(nai_settings.top_p),
|
||||
'top_k': Number(nai_settings.top_k),
|
||||
'min_p': Number(nai_settings.min_p),
|
||||
'math1_temp': Number(nai_settings.math1_temp),
|
||||
'math1_quad': Number(nai_settings.math1_quad),
|
||||
'math1_quad_entropy_scale': Number(nai_settings.math1_quad_entropy_scale),
|
||||
'typical_p': Number(nai_settings.typical_p),
|
||||
'mirostat_lr': Number(nai_settings.mirostat_lr),
|
||||
'mirostat_tau': Number(nai_settings.mirostat_tau),
|
||||
|
@ -175,6 +175,10 @@ router.post('/generate', jsonParser, async function (req, res) {
|
||||
'prefix': req.body.prefix,
|
||||
'order': req.body.order,
|
||||
'num_logprobs': req.body.num_logprobs,
|
||||
'min_p': req.body.min_p,
|
||||
'math1_temp': req.body.math1_temp,
|
||||
'math1_quad': req.body.math1_quad,
|
||||
'math1_quad_entropy_scale': req.body.math1_quad_entropy_scale,
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user