Merge branch 'staging' into sysprompt-divorce
| @@ -508,10 +508,6 @@ | |||
| 508 | "type": "context" | 508 | "type": "context" |
| 509 | }, | 509 | }, |
| 510 | { | 510 | { |
| 511 | "filename": "presets/context/Mistral.json", | ||
| 512 | "type": "context" | ||
| 513 | }, | ||
| 514 | { | ||
| 515 | "filename": "presets/context/NovelAI.json", | 511 | "filename": "presets/context/NovelAI.json", |
| 516 | "type": "context" | 512 | "type": "context" |
| 517 | }, | 513 | }, |
| @@ -592,10 +588,6 @@ | |||
| 592 | "type": "instruct" | 588 | "type": "instruct" |
| 593 | }, | 589 | }, |
| 594 | { | 590 | { |
| 595 | "filename": "presets/instruct/Mistral.json", | ||
| 596 | "type": "instruct" | ||
| 597 | }, | ||
| 598 | { | ||
| 599 | "filename": "presets/instruct/OpenOrca-OpenChat.json", | 591 | "filename": "presets/instruct/OpenOrca-OpenChat.json", |
| 600 | "type": "instruct" | 592 | "type": "instruct" |
| 601 | }, | 593 | }, |
| @@ -726,5 +718,29 @@ | |||
| 726 | { | 718 | { |
| 727 | "filename": "presets/sysprompt/Neutral - Chat.json", | 719 | "filename": "presets/sysprompt/Neutral - Chat.json", |
| 728 | "type": "sysprompt" | 720 | "type": "sysprompt" |
| 721 | }, | ||
| 722 | { | ||
| 723 | "filename": "presets/instruct/Mistral V1.json", | ||
| 724 | "type": "instruct" | ||
| 725 | }, | ||
| 726 | { | ||
| 727 | "filename": "presets/context/Mistral V1.json", | ||
| 728 | "type": "context" | ||
| 729 | }, | ||
| 730 | { | ||
| 731 | "filename": "presets/instruct/Mistral V2 & V3.json", | ||
| 732 | "type": "instruct" | ||
| 733 | }, | ||
| 734 | { | ||
| 735 | "filename": "presets/context/Mistral V2 & V3.json", | ||
| 736 | "type": "context" | ||
| 737 | }, | ||
| 738 | { | ||
| 739 | "filename": "presets/instruct/Mistral V3-Tekken.json", | ||
| 740 | "type": "instruct" | ||
| 741 | }, | ||
| 742 | { | ||
| 743 | "filename": "presets/context/Mistral V3-Tekken.json", | ||
| 744 | "type": "context" | ||
| 729 | } | 745 | } |
| 730 | ] | 746 | ] |
| @@ -0,0 +1,12 @@ | |||
| 1 | { | ||
| 2 | "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>", | ||
| 3 | "example_separator": "", | ||
| 4 | "chat_start": "", | ||
| 5 | "use_stop_strings": false, | ||
| 6 | "allow_jailbreak": false, | ||
| 7 | "always_force_name2": true, | ||
| 8 | "trim_sentences": false, | ||
| 9 | "include_newline": false, | ||
| 10 | "single_line": false, | ||
| 11 | "name": "Mistral V1" | ||
| 12 | } | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | { | 1 | { |
| 2 | "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]", | 2 | "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>", |
| 3 | "example_separator": "Examples:", | 3 | "example_separator": "", |
| 4 | "chat_start": "", | 4 | "chat_start": "", |
| 5 | "use_stop_strings": false, | 5 | "use_stop_strings": false, |
| 6 | "allow_jailbreak": false, | 6 | "allow_jailbreak": false, |
| @@ -8,5 +8,5 @@ | |||
| 8 | "trim_sentences": false, | 8 | "trim_sentences": false, |
| 9 | "include_newline": false, | 9 | "include_newline": false, |
| 10 | "single_line": false, | 10 | "single_line": false, |
| 11 | "name": "Mistral" | 11 | "name": "Mistral V2 & V3" |
| 12 | } | 12 | } |
| @@ -0,0 +1,12 @@ | |||
| 1 | { | ||
| 2 | "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>", | ||
| 3 | "example_separator": "", | ||
| 4 | "chat_start": "", | ||
| 5 | "use_stop_strings": false, | ||
| 6 | "allow_jailbreak": false, | ||
| 7 | "always_force_name2": true, | ||
| 8 | "trim_sentences": false, | ||
| 9 | "include_newline": false, | ||
| 10 | "single_line": false, | ||
| 11 | "name": "Mistral V3-Tekken" | ||
| 12 | } | ||
| @@ -0,0 +1,22 @@ | |||
| 1 | { | ||
| 2 | "input_sequence": " [INST] ", | ||
| 3 | "output_sequence": " [/INST] ", | ||
| 4 | "last_output_sequence": " [/INST]", | ||
| 5 | "system_sequence": "", | ||
| 6 | "stop_sequence": "", | ||
| 7 | "wrap": false, | ||
| 8 | "macro": true, | ||
| 9 | "names_behavior": "always", | ||
| 10 | "activation_regex": "", | ||
| 11 | "system_sequence_prefix": "", | ||
| 12 | "system_sequence_suffix": "", | ||
| 13 | "first_output_sequence": "", | ||
| 14 | "skip_examples": false, | ||
| 15 | "output_suffix": "</s>", | ||
| 16 | "input_suffix": "", | ||
| 17 | "system_suffix": "", | ||
| 18 | "user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.", | ||
| 19 | "system_same_as_user": true, | ||
| 20 | "last_system_sequence": "", | ||
| 21 | "name": "Mistral V1" | ||
| 22 | } | ||
| @@ -1,7 +1,7 @@ | |||
| 1 | { | 1 | { |
| 2 | "input_sequence": "[INST] ", | 2 | "input_sequence": "[INST] ", |
| 3 | "output_sequence": "", | 3 | "output_sequence": "[/INST] ", |
| 4 | "last_output_sequence": "", | 4 | "last_output_sequence": "[/INST]", |
| 5 | "system_sequence": "", | 5 | "system_sequence": "", |
| 6 | "stop_sequence": "", | 6 | "stop_sequence": "", |
| 7 | "wrap": false, | 7 | "wrap": false, |
| @@ -12,11 +12,11 @@ | |||
| 12 | "system_sequence_suffix": "", | 12 | "system_sequence_suffix": "", |
| 13 | "first_output_sequence": "", | 13 | "first_output_sequence": "", |
| 14 | "skip_examples": false, | 14 | "skip_examples": false, |
| 15 | "output_suffix": "\n", | 15 | "output_suffix": "</s>", |
| 16 | "input_suffix": " [/INST]\n", | 16 | "input_suffix": "", |
| 17 | "system_suffix": "", | 17 | "system_suffix": "", |
| 18 | "user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.", | 18 | "user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.", |
| 19 | "system_same_as_user": true, | 19 | "system_same_as_user": true, |
| 20 | "last_system_sequence": "", | 20 | "last_system_sequence": "", |
| 21 | "name": "Mistral" | 21 | "name": "Mistral V2 & V3" |
| 22 | } | 22 | } |
| @@ -0,0 +1,22 @@ | |||
| 1 | { | ||
| 2 | "input_sequence": "[INST]", | ||
| 3 | "output_sequence": "[/INST]", | ||
| 4 | "last_output_sequence": "", | ||
| 5 | "system_sequence": "", | ||
| 6 | "stop_sequence": "", | ||
| 7 | "wrap": false, | ||
| 8 | "macro": true, | ||
| 9 | "names_behavior": "always", | ||
| 10 | "activation_regex": "", | ||
| 11 | "system_sequence_prefix": "", | ||
| 12 | "system_sequence_suffix": "", | ||
| 13 | "first_output_sequence": "", | ||
| 14 | "skip_examples": false, | ||
| 15 | "output_suffix": "</s>", | ||
| 16 | "input_suffix": "", | ||
| 17 | "system_suffix": "", | ||
| 18 | "user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.", | ||
| 19 | "system_same_as_user": true, | ||
| 20 | "last_system_sequence": "", | ||
| 21 | "name": "Mistral V3-Tekken" | ||
| 22 | } | ||
| @@ -16,5 +16,9 @@ | |||
| 16 | "prefix": "vanilla", | 16 | "prefix": "vanilla", |
| 17 | "cfg_scale": 1, | 17 | "cfg_scale": 1, |
| 18 | "phrase_rep_pen": "medium", | 18 | "phrase_rep_pen": "medium", |
| 19 | "max_context": 7800 | 19 | "max_context": 7800, |
| 20 | "min_p": 0, | ||
| 21 | "math1_temp": 1, | ||
| 22 | "math1_quad": 0, | ||
| 23 | "math1_quad_entropy_scale": 0 | ||
| 20 | } | 24 | } |
| @@ -15,5 +15,9 @@ | |||
| 15 | "prefix": "vanilla", | 15 | "prefix": "vanilla", |
| 16 | "phrase_rep_pen": "medium", | 16 | "phrase_rep_pen": "medium", |
| 17 | "cfg_scale": 1.55, | 17 | "cfg_scale": 1.55, |
| 18 | "max_context": 7800 | 18 | "max_context": 7800, |
| 19 | "min_p": 0, | ||
| 20 | "math1_temp": 1, | ||
| 21 | "math1_quad": 0, | ||
| 22 | "math1_quad_entropy_scale": 0 | ||
| 19 | } | 23 | } |
| @@ -16,5 +16,9 @@ | |||
| 16 | "prefix": "vanilla", | 16 | "prefix": "vanilla", |
| 17 | "phrase_rep_pen": "very_aggressive", | 17 | "phrase_rep_pen": "very_aggressive", |
| 18 | "cfg_scale": 1.3, | 18 | "cfg_scale": 1.3, |
| 19 | "max_context": 7800 | 19 | "max_context": 7800, |
| 20 | "min_p": 0, | ||
| 21 | "math1_temp": 1, | ||
| 22 | "math1_quad": 0, | ||
| 23 | "math1_quad_entropy_scale": 0 | ||
| 20 | } | 24 | } |
| @@ -17,5 +17,9 @@ | |||
| 17 | "prefix": "vanilla", | 17 | "prefix": "vanilla", |
| 18 | "cfg_scale": 1, | 18 | "cfg_scale": 1, |
| 19 | "phrase_rep_pen": "aggressive", | 19 | "phrase_rep_pen": "aggressive", |
| 20 | "max_context": 7800 | 20 | "max_context": 7800, |
| 21 | "min_p": 0, | ||
| 22 | "math1_temp": 1, | ||
| 23 | "math1_quad": 0, | ||
| 24 | "math1_quad_entropy_scale": 0 | ||
| 21 | } | 25 | } |
| @@ -16,5 +16,9 @@ | |||
| 16 | "prefix": "vanilla", | 16 | "prefix": "vanilla", |
| 17 | "phrase_rep_pen": "off", | 17 | "phrase_rep_pen": "off", |
| 18 | "cfg_scale": 1.48, | 18 | "cfg_scale": 1.48, |
| 19 | "max_context": 7800 | 19 | "max_context": 7800, |
| 20 | "min_p": 0, | ||
| 21 | "math1_temp": 1, | ||
| 22 | "math1_quad": 0, | ||
| 23 | "math1_quad_entropy_scale": 0 | ||
| 20 | } | 24 | } |
| @@ -17,5 +17,9 @@ | |||
| 17 | "prefix": "vanilla", | 17 | "prefix": "vanilla", |
| 18 | "cfg_scale": 1, | 18 | "cfg_scale": 1, |
| 19 | "phrase_rep_pen": "very_light", | 19 | "phrase_rep_pen": "very_light", |
| 20 | "max_context": 7800 | 20 | "max_context": 7800, |
| 21 | "min_p": 0, | ||
| 22 | "math1_temp": 1, | ||
| 23 | "math1_quad": 0, | ||
| 24 | "math1_quad_entropy_scale": 0 | ||
| 21 | } | 25 | } |
| @@ -18,5 +18,9 @@ | |||
| 18 | "prefix": "vanilla", | 18 | "prefix": "vanilla", |
| 19 | "cfg_scale": 1, | 19 | "cfg_scale": 1, |
| 20 | "phrase_rep_pen": "very_light", | 20 | "phrase_rep_pen": "very_light", |
| 21 | "max_context": 7800 | 21 | "max_context": 7800, |
| 22 | "min_p": 0, | ||
| 23 | "math1_temp": 1, | ||
| 24 | "math1_quad": 0, | ||
| 25 | "math1_quad_entropy_scale": 0 | ||
| 22 | } | 26 | } |
| @@ -16,5 +16,9 @@ | |||
| 16 | "prefix": "vanilla", | 16 | "prefix": "vanilla", |
| 17 | "cfg_scale": 1, | 17 | "cfg_scale": 1, |
| 18 | "phrase_rep_pen": "off", | 18 | "phrase_rep_pen": "off", |
| 19 | "max_context": 7800 | 19 | "max_context": 7800, |
| 20 | "min_p": 0, | ||
| 21 | "math1_temp": 1, | ||
| 22 | "math1_quad": 0, | ||
| 23 | "math1_quad_entropy_scale": 0 | ||
| 20 | } | 24 | } |
| @@ -16,5 +16,9 @@ | |||
| 16 | "prefix": "vanilla", | 16 | "prefix": "vanilla", |
| 17 | "phrase_rep_pen": "very_aggressive", | 17 | "phrase_rep_pen": "very_aggressive", |
| 18 | "cfg_scale": 1.4, | 18 | "cfg_scale": 1.4, |
| 19 | "max_context": 7800 | 19 | "max_context": 7800, |
| 20 | "min_p": 0, | ||
| 21 | "math1_temp": 1, | ||
| 22 | "math1_quad": 0, | ||
| 23 | "math1_quad_entropy_scale": 0 | ||
| 20 | } | 24 | } |
| @@ -18,5 +18,9 @@ | |||
| 18 | "prefix": "vanilla", | 18 | "prefix": "vanilla", |
| 19 | "cfg_scale": 1, | 19 | "cfg_scale": 1, |
| 20 | "phrase_rep_pen": "very_light", | 20 | "phrase_rep_pen": "very_light", |
| 21 | "max_context": 7800 | 21 | "max_context": 7800, |
| 22 | "min_p": 0, | ||
| 23 | "math1_temp": 1, | ||
| 24 | "math1_quad": 0, | ||
| 25 | "math1_quad_entropy_scale": 0 | ||
| 22 | } | 26 | } |
| @@ -18,5 +18,9 @@ | |||
| 18 | "prefix": "vanilla", | 18 | "prefix": "vanilla", |
| 19 | "cfg_scale": 1, | 19 | "cfg_scale": 1, |
| 20 | "phrase_rep_pen": "very_light", | 20 | "phrase_rep_pen": "very_light", |
| 21 | "max_context": 7800 | 21 | "max_context": 7800, |
| 22 | "min_p": 0, | ||
| 23 | "math1_temp": 1, | ||
| 24 | "math1_quad": 0, | ||
| 25 | "math1_quad_entropy_scale": 0 | ||
| 22 | } | 26 | } |
| @@ -18,5 +18,9 @@ | |||
| 18 | "prefix": "vanilla", | 18 | "prefix": "vanilla", |
| 19 | "phrase_rep_pen": "medium", | 19 | "phrase_rep_pen": "medium", |
| 20 | "cfg_scale": 1.35, | 20 | "cfg_scale": 1.35, |
| 21 | "max_context": 7800 | 21 | "max_context": 7800, |
| 22 | "min_p": 0, | ||
| 23 | "math1_temp": 1, | ||
| 24 | "math1_quad": 0, | ||
| 25 | "math1_quad_entropy_scale": 0 | ||
| 22 | } | 26 | } |
| @@ -16,5 +16,9 @@ | |||
| 16 | "prefix": "vanilla", | 16 | "prefix": "vanilla", |
| 17 | "phrase_rep_pen": "medium", | 17 | "phrase_rep_pen": "medium", |
| 18 | "cfg_scale": 1.0, | 18 | "cfg_scale": 1.0, |
| 19 | "max_context": 7800 | 19 | "max_context": 7800, |
| 20 | "min_p": 0, | ||
| 21 | "math1_temp": 1, | ||
| 22 | "math1_quad": 0, | ||
| 23 | "math1_quad_entropy_scale": 0 | ||
| 20 | } | 24 | } |
| @@ -13,5 +13,9 @@ | |||
| 13 | "return_full_text": false, | 13 | "return_full_text": false, |
| 14 | "prefix": "vanilla", | 14 | "prefix": "vanilla", |
| 15 | "phrase_rep_pen": "medium", | 15 | "phrase_rep_pen": "medium", |
| 16 | "max_context": 7800 | 16 | "max_context": 7800, |
| 17 | "min_p": 0, | ||
| 18 | "math1_temp": 1, | ||
| 19 | "math1_quad": 0, | ||
| 20 | "math1_quad_entropy_scale": 0 | ||
| 17 | } | 21 | } |
| @@ -18,5 +18,9 @@ | |||
| 18 | "prefix": "vanilla", | 18 | "prefix": "vanilla", |
| 19 | "cfg_scale": 1, | 19 | "cfg_scale": 1, |
| 20 | "phrase_rep_pen": "very_light", | 20 | "phrase_rep_pen": "very_light", |
| 21 | "max_context": 7800 | 21 | "max_context": 7800, |
| 22 | "min_p": 0, | ||
| 23 | "math1_temp": 1, | ||
| 24 | "math1_quad": 0, | ||
| 25 | "math1_quad_entropy_scale": 0 | ||
| 22 | } | 26 | } |
| @@ -15,5 +15,9 @@ | |||
| 15 | "prefix": "vanilla", | 15 | "prefix": "vanilla", |
| 16 | "phrase_rep_pen": "aggressive", | 16 | "phrase_rep_pen": "aggressive", |
| 17 | "cfg_scale": 1.0, | 17 | "cfg_scale": 1.0, |
| 18 | "max_context": 7800 | 18 | "max_context": 7800, |
| 19 | "min_p": 0, | ||
| 20 | "math1_temp": 1, | ||
| 21 | "math1_quad": 0, | ||
| 22 | "math1_quad_entropy_scale": 0 | ||
| 19 | } | 23 | } |
| @@ -14,5 +14,9 @@ | |||
| 14 | "prefix": "vanilla", | 14 | "prefix": "vanilla", |
| 15 | "phrase_rep_pen": "aggressive", | 15 | "phrase_rep_pen": "aggressive", |
| 16 | "cfg_scale": 1.3, | 16 | "cfg_scale": 1.3, |
| 17 | "max_context": 7800 | 17 | "max_context": 7800, |
| 18 | "min_p": 0, | ||
| 19 | "math1_temp": 1, | ||
| 20 | "math1_quad": 0, | ||
| 21 | "math1_quad_entropy_scale": 0 | ||
| 18 | } | 22 | } |
| @@ -18,5 +18,9 @@ | |||
| 18 | "prefix": "vanilla", | 18 | "prefix": "vanilla", |
| 19 | "cfg_scale": 1, | 19 | "cfg_scale": 1, |
| 20 | "phrase_rep_pen": "very_light", | 20 | "phrase_rep_pen": "very_light", |
| 21 | "max_context": 7800 | 21 | "max_context": 7800, |
| 22 | "min_p": 0, | ||
| 23 | "math1_temp": 1, | ||
| 24 | "math1_quad": 0, | ||
| 25 | "math1_quad_entropy_scale": 0 | ||
| 22 | } | 26 | } |
| @@ -17,5 +17,9 @@ | |||
| 17 | "return_full_text": false, | 17 | "return_full_text": false, |
| 18 | "prefix": "vanilla", | 18 | "prefix": "vanilla", |
| 19 | "phrase_rep_pen": "very_aggressive", | 19 | "phrase_rep_pen": "very_aggressive", |
| 20 | "max_context": 7800 | 20 | "max_context": 7800, |
| 21 | "min_p": 0, | ||
| 22 | "math1_temp": 1, | ||
| 23 | "math1_quad": 0, | ||
| 24 | "math1_quad_entropy_scale": 0 | ||
| 21 | } | 25 | } |
| @@ -324,6 +324,19 @@ | |||
| 324 | </div> | 324 | </div> |
| 325 | </div> | 325 | </div> |
| 326 | <div class="range-block"> | 326 | <div class="range-block"> |
| 327 | <div class="range-block-title" data-i18n="Min P"> | ||
| 328 | Min P | ||
| 329 | </div> | ||
| 330 | <div class="range-block-range-and-counter"> | ||
| 331 | <div class="range-block-range"> | ||
| 332 | <input type="range" id="min_p_novel" name="volume" min="0" max="1" step="0.001"> | ||
| 333 | </div> | ||
| 334 | <div class="range-block-counter"> | ||
| 335 | <input type="number" min="0" max="1" step="0.001" data-for="min_p_novel" id="min_p_counter_novel"> | ||
| 336 | </div> | ||
| 337 | </div> | ||
| 338 | </div> | ||
| 339 | <div class="range-block"> | ||
| 327 | <div class="range-block-title" data-i18n="TFS"> | 340 | <div class="range-block-title" data-i18n="TFS"> |
| 328 | TFS | 341 | TFS |
| 329 | </div> | 342 | </div> |
| @@ -337,6 +350,136 @@ | |||
| 337 | </div> | 350 | </div> |
| 338 | </div> | 351 | </div> |
| 339 | <div class="range-block"> | 352 | <div class="range-block"> |
| 353 | <div class="range-block-title" data-i18n="Top P"> | ||
| 354 | Top P | ||
| 355 | </div> | ||
| 356 | <div class="range-block-range-and-counter"> | ||
| 357 | <div class="range-block-range"> | ||
| 358 | <input type="range" id="top_p_novel" name="volume" min="0" max="1" step="0.001"> | ||
| 359 | </div> | ||
| 360 | <div class="range-block-counter"> | ||
| 361 | <input type="number" min="0" max="1" step="0.001" data-for="top_p_novel" id="top_p_counter_novel"> | ||
| 362 | </div> | ||
| 363 | </div> | ||
| 364 | </div> | ||
| 365 | <div class="range-block"> | ||
| 366 | <div class="range-block-title" data-i18n="Top A"> | ||
| 367 | Top A | ||
| 368 | </div> | ||
| 369 | <div class="range-block-range-and-counter"> | ||
| 370 | <div class="range-block-range"> | ||
| 371 | <input type="range" id="top_a_novel" name="volume" min="0" max="1" step="0.001"> | ||
| 372 | </div> | ||
| 373 | <div class="range-block-counter"> | ||
| 374 | <input type="number" min="0" max="1" step="0.001" data-for="top_a_novel" id="top_a_counter_novel"> | ||
| 375 | </div> | ||
| 376 | </div> | ||
| 377 | </div> | ||
| 378 | <div class="range-block"> | ||
| 379 | <div class="range-block-title" data-i18n="Top K"> | ||
| 380 | Top K | ||
| 381 | </div> | ||
| 382 | <div class="range-block-range-and-counter"> | ||
| 383 | <div class="range-block-range"> | ||
| 384 | <input type="range" id="top_k_novel" name="volume" min="0" max="300" step="1"> | ||
| 385 | </div> | ||
| 386 | <div class="range-block-counter"> | ||
| 387 | <input type="number" min="0" max="300" step="1" data-for="top_k_novel" id="top_k_counter_novel"> | ||
| 388 | </div> | ||
| 389 | </div> | ||
| 390 | </div> | ||
| 391 | <div class="range-block"> | ||
| 392 | <div class="range-block-title" data-i18n="Mirostat Tau"> | ||
| 393 | Mirostat Tau | ||
| 394 | </div> | ||
| 395 | <div class="range-block-range-and-counter"> | ||
| 396 | <div class="range-block-range"> | ||
| 397 | <input type="range" id="mirostat_tau_novel" name="volume" min="0" max="6" step="0.01"> | ||
| 398 | </div> | ||
| 399 | <div class="range-block-counter"> | ||
| 400 | <input type="number" min="0" max="6" step="0.01" data-for="mirostat_tau_novel" id="mirostat_tau_counter_novel"> | ||
| 401 | </div> | ||
| 402 | </div> | ||
| 403 | </div> | ||
| 404 | <div class="range-block"> | ||
| 405 | <div class="range-block-title" data-i18n="Mirostat LR"> | ||
| 406 | Mirostat LR | ||
| 407 | </div> | ||
| 408 | <div class="range-block-range-and-counter"> | ||
| 409 | <div class="range-block-range"> | ||
| 410 | <input type="range" id="mirostat_lr_novel" name="volume" min="0" max="1" step="0.01"> | ||
| 411 | </div> | ||
| 412 | <div class="range-block-counter"> | ||
| 413 | <input type="number" min="0" max="1" step="0.01" data-for="mirostat_lr_novel" id="mirostat_lr_counter_novel"> | ||
| 414 | </div> | ||
| 415 | </div> | ||
| 416 | </div> | ||
| 417 | <div class="range-block"> | ||
| 418 | <div class="range-block-title" data-i18n="Typical P"> | ||
| 419 | Typical P | ||
| 420 | </div> | ||
| 421 | <div class="range-block-range-and-counter"> | ||
| 422 | <div class="range-block-range"> | ||
| 423 | <input type="range" id="typical_p_novel" name="volume" min="0" max="1" step="0.001"> | ||
| 424 | </div> | ||
| 425 | <div class="range-block-counter"> | ||
| 426 | <input type="number" min="0" max="1" step="0.001" data-for="typical_p_novel" id="typical_p_counter_novel"> | ||
| 427 | </div> | ||
| 428 | </div> | ||
| 429 | </div> | ||
| 430 | <div class="range-block"> | ||
| 431 | <div class="range-block-title" data-i18n="Linear"> | ||
| 432 | Linear | ||
| 433 | </div> | ||
| 434 | <div class="range-block-range-and-counter"> | ||
| 435 | <div class="range-block-range"> | ||
| 436 | <input type="range" id="math1_temp_novel" name="volume" min="0" max="1.5" step="0.01"> | ||
| 437 | </div> | ||
| 438 | <div class="range-block-counter"> | ||
| 439 | <input type="number" min="0" max="1.5" step="0.01" data-for="math1_temp_novel" id="math1_temp_counter_novel"> | ||
| 440 | </div> | ||
| 441 | </div> | ||
| 442 | </div> | ||
| 443 | <div class="range-block"> | ||
| 444 | <div class="range-block-title" data-i18n="Quad"> | ||
| 445 | Quad | ||
| 446 | </div> | ||
| 447 | <div class="range-block-range-and-counter"> | ||
| 448 | <div class="range-block-range"> | ||
| 449 | <input type="range" id="math1_quad_novel" name="volume" min="0" max="0.4" step="0.01"> | ||
| 450 | </div> | ||
| 451 | <div class="range-block-counter"> | ||
| 452 | <input type="number" min="0" max="0.4" step="0.01" data-for="math1_quad_novel" id="math1_quad_counter_novel"> | ||
| 453 | </div> | ||
| 454 | </div> | ||
| 455 | </div> | ||
| 456 | <div class="range-block"> | ||
| 457 | <div class="range-block-title" data-i18n="Conf"> | ||
| 458 | Conf | ||
| 459 | </div> | ||
| 460 | <div class="range-block-range-and-counter"> | ||
| 461 | <div class="range-block-range"> | ||
| 462 | <input type="range" id="math1_quad_entropy_scale_novel" name="volume" min="-0.4" max="0.4" step="0.01"> | ||
| 463 | </div> | ||
| 464 | <div class="range-block-counter"> | ||
| 465 | <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"> | ||
| 466 | </div> | ||
| 467 | </div> | ||
| 468 | </div> | ||
| 469 | <div class="range-block"> | ||
| 470 | <div class="range-block-title" data-i18n="Min Length"> | ||
| 471 | Min Length | ||
| 472 | </div> | ||
| 473 | <div class="range-block-range-and-counter"> | ||
| 474 | <div class="range-block-range"> | ||
| 475 | <input type="range" id="min_length_novel" name="volume" min="1" max="150" step="1"> | ||
| 476 | </div> | ||
| 477 | <div class="range-block-counter"> | ||
| 478 | <input type="number" min="1" max="150" step="1" data-for="min_length_novel" id="min_length_counter_novel"> | ||
| 479 | </div> | ||
| 480 | </div> | ||
| 481 | </div> | ||
| 482 | <div class="range-block"> | ||
| 340 | <div class="range-block-title" data-i18n="Phrase Repetition Penalty"> | 483 | <div class="range-block-title" data-i18n="Phrase Repetition Penalty"> |
| 341 | Phrase Repetition Penalty | 484 | Phrase Repetition Penalty |
| 342 | </div> | 485 | </div> |
| @@ -349,6 +492,72 @@ | |||
| 349 | <option value="very_aggressive" data-i18n="Very aggressive">Very aggressive</option> | 492 | <option value="very_aggressive" data-i18n="Very aggressive">Very aggressive</option> |
| 350 | </select> | 493 | </select> |
| 351 | </div> | 494 | </div> |
| 495 | <div class="range-block"> | ||
| 496 | <div class="range-block-title openai_restorable"> | ||
| 497 | <span data-i18n="Preamble">Preamble</span> | ||
| 498 | <div id="nai_preamble_restore" title="Restore default prompt" data-i18n="[title]Restore default prompt" class="right_menu_button"> | ||
| 499 | <div class="fa-solid fa-clock-rotate-left "></div> | ||
| 500 | </div> | ||
| 501 | </div> | ||
| 502 | <div class="toggle-description justifyLeft" data-i18n="Use style tags to modify the writing style of the output."> | ||
| 503 | Use style tags to modify the writing style of the output. | ||
| 504 | </div> | ||
| 505 | <div class="wide100p"> | ||
| 506 | <textarea id="nai_preamble_textarea" class="text_pole textarea_compact" name="nai_preamble" rows="2" placeholder=""></textarea> | ||
| 507 | </div> | ||
| 508 | </div> | ||
| 509 | <div class="range-block"> | ||
| 510 | <div class="range-block-title justifyLeft"> | ||
| 511 | <span data-i18n="Banned Tokens">Banned Tokens</span> | ||
| 512 | </div> | ||
| 513 | <div class="toggle-description justifyLeft" data-i18n="Sequences you don't want to appear in the output. One per line."> | ||
| 514 | Sequences you don't want to appear in the output. One per line. Text or [token ids]. | ||
| 515 | </div> | ||
| 516 | <div class="wide100p"> | ||
| 517 | <textarea id="nai_banned_tokens" class="text_pole textarea_compact" name="nai_banned_tokens" rows="3" placeholder="Example: some text [42, 69, 1337]"></textarea> | ||
| 518 | </div> | ||
| 519 | </div> | ||
| 520 | <div class="range-block"> | ||
| 521 | <div id="logit_bias_novel" class="range-block-title title_restorable"> | ||
| 522 | <span data-i18n="Logit Bias">Logit Bias</span> | ||
| 523 | <div id="novelai_logit_bias_new_entry" class="menu_button menu_button_icon"> | ||
| 524 | <i class="fa-xs fa-solid fa-plus"></i> | ||
| 525 | <small data-i18n="Add">Add</small> | ||
| 526 | </div> | ||
| 527 | </div> | ||
| 528 | <div class="toggle-description justifyLeft" data-i18n="Helps to ban or reenforce the usage of certain words"> | ||
| 529 | Helps to ban or reinforce the usage of certain tokens. | ||
| 530 | </div> | ||
| 531 | <div class="flex-container flexFlowColumn wide100p"> | ||
| 532 | <div class="logit_bias_list"></div> | ||
| 533 | </div> | ||
| 534 | </div> | ||
| 535 | <div class="range-block"> | ||
| 536 | <hr> | ||
| 537 | <div class="range-block-title justifyLeft" data-i18n="CFG Scale"> | ||
| 538 | CFG Scale | ||
| 539 | </div> | ||
| 540 | <div class="range-block-range-and-counter"> | ||
| 541 | <div class="range-block-range"> | ||
| 542 | <input type="range" id="cfg_scale_novel" name="volume" min="1" max="3" step="0.05"> | ||
| 543 | </div> | ||
| 544 | <div class="range-block-counter"> | ||
| 545 | <input type="number" min="1" max="3" step="0.05" data-for="cfg_scale_novel" id="cfg_scale_counter_novel"> | ||
| 546 | </div> | ||
| 547 | </div> | ||
| 548 | </div> | ||
| 549 | <div class="range-block"> | ||
| 550 | <div class="range-block-title justifyLeft"> | ||
| 551 | <span data-i18n="Negative Prompt">Negative Prompt</span> | ||
| 552 | </div> | ||
| 553 | <div class="wide100p"> | ||
| 554 | <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> | ||
| 555 | </div> | ||
| 556 | <small class="margin-bot-10px" data-i18n="Used if CFG Scale is unset globally, per chat or character"> | ||
| 557 | Used if CFG Scale is unset globally, per chat or character | ||
| 558 | </small> | ||
| 559 | <hr> | ||
| 560 | </div> | ||
| 352 | </div> | 561 | </div> |
| 353 | <div id="range_block_openai"> | 562 | <div id="range_block_openai"> |
| 354 | <div class="range-block"> | 563 | <div class="range-block"> |
| @@ -907,163 +1116,6 @@ | |||
| 907 | </div> | 1116 | </div> |
| 908 | </div><!-- end of kobold settings--> | 1117 | </div><!-- end of kobold settings--> |
| 909 | <div id="novel_api-settings"> | 1118 | <div id="novel_api-settings"> |
| 910 | <div class="range-block"> | ||
| 911 | <div class="range-block-title openai_restorable"> | ||
| 912 | <span data-i18n="Preamble">Preamble</span> | ||
| 913 | <div id="nai_preamble_restore" title="Restore default prompt" data-i18n="[title]Restore default prompt" class="right_menu_button"> | ||
| 914 | <div class="fa-solid fa-clock-rotate-left "></div> | ||
| 915 | </div> | ||
| 916 | </div> | ||
| 917 | <div class="toggle-description justifyLeft" data-i18n="Use style tags to modify the writing style of the output."> | ||
| 918 | Use style tags to modify the writing style of the output. | ||
| 919 | </div> | ||
| 920 | <div class="wide100p"> | ||
| 921 | <textarea id="nai_preamble_textarea" class="text_pole textarea_compact" name="nai_preamble" rows="2" placeholder=""></textarea> | ||
| 922 | </div> | ||
| 923 | </div> | ||
| 924 | <div class="range-block"> | ||
| 925 | <div class="range-block-title justifyLeft"> | ||
| 926 | <span data-i18n="Banned Tokens">Banned Tokens</span> | ||
| 927 | </div> | ||
| 928 | <div class="toggle-description justifyLeft" data-i18n="Sequences you don't want to appear in the output. One per line."> | ||
| 929 | Sequences you don't want to appear in the output. One per line. Text or [token ids]. | ||
| 930 | </div> | ||
| 931 | <div class="wide100p"> | ||
| 932 | <textarea id="nai_banned_tokens" class="text_pole textarea_compact" name="nai_banned_tokens" rows="3" placeholder="Example: some text [42, 69, 1337]"></textarea> | ||
| 933 | </div> | ||
| 934 | </div> | ||
| 935 | <div class="range-block"> | ||
| 936 | <div id="logit_bias_novel" class="range-block-title title_restorable"> | ||
| 937 | <span data-i18n="Logit Bias">Logit Bias</span> | ||
| 938 | <div id="novelai_logit_bias_new_entry" class="menu_button menu_button_icon"> | ||
| 939 | <i class="fa-xs fa-solid fa-plus"></i> | ||
| 940 | <small data-i18n="Add">Add</small> | ||
| 941 | </div> | ||
| 942 | </div> | ||
| 943 | <div class="toggle-description justifyLeft" data-i18n="Helps to ban or reenforce the usage of certain words"> | ||
| 944 | Helps to ban or reinforce the usage of certain tokens. | ||
| 945 | </div> | ||
| 946 | <div class="flex-container flexFlowColumn wide100p"> | ||
| 947 | <div class="logit_bias_list"></div> | ||
| 948 | </div> | ||
| 949 | </div> | ||
| 950 | <div class="range-block"> | ||
| 951 | <hr> | ||
| 952 | <div class="range-block-title justifyLeft" data-i18n="CFG Scale"> | ||
| 953 | CFG Scale | ||
| 954 | </div> | ||
| 955 | <div class="range-block-range-and-counter"> | ||
| 956 | <div class="range-block-range"> | ||
| 957 | <input type="range" id="cfg_scale_novel" name="volume" min="1" max="3" step="0.05"> | ||
| 958 | </div> | ||
| 959 | <div class="range-block-counter"> | ||
| 960 | <input type="number" min="1" max="3" step="0.05" data-for="cfg_scale_novel" id="cfg_scale_counter_novel"> | ||
| 961 | </div> | ||
| 962 | </div> | ||
| 963 | </div> | ||
| 964 | <div class="range-block"> | ||
| 965 | <div class="range-block-title justifyLeft"> | ||
| 966 | <span data-i18n="Negative Prompt">Negative Prompt</span> | ||
| 967 | </div> | ||
| 968 | <div class="wide100p"> | ||
| 969 | <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> | ||
| 970 | </div> | ||
| 971 | <small class="margin-bot-10px" data-i18n="Used if CFG Scale is unset globally, per chat or character"> | ||
| 972 | Used if CFG Scale is unset globally, per chat or character | ||
| 973 | </small> | ||
| 974 | <hr> | ||
| 975 | </div> | ||
| 976 | <div class="range-block"> | ||
| 977 | <div class="range-block-title" data-i18n="Top P"> | ||
| 978 | Top P | ||
| 979 | </div> | ||
| 980 | <div class="range-block-range-and-counter"> | ||
| 981 | <div class="range-block-range"> | ||
| 982 | <input type="range" id="top_p_novel" name="volume" min="0" max="1" step="0.001"> | ||
| 983 | </div> | ||
| 984 | <div class="range-block-counter"> | ||
| 985 | <input type="number" min="0" max="1" step="0.001" data-for="top_p_novel" id="top_p_counter_novel"> | ||
| 986 | </div> | ||
| 987 | </div> | ||
| 988 | </div> | ||
| 989 | <div class="range-block"> | ||
| 990 | <div class="range-block-title" data-i18n="Top A"> | ||
| 991 | Top A | ||
| 992 | </div> | ||
| 993 | <div class="range-block-range-and-counter"> | ||
| 994 | <div class="range-block-range"> | ||
| 995 | <input type="range" id="top_a_novel" name="volume" min="0" max="1" step="0.001"> | ||
| 996 | </div> | ||
| 997 | <div class="range-block-counter"> | ||
| 998 | <input type="number" min="0" max="1" step="0.001" data-for="top_a_novel" id="top_a_counter_novel"> | ||
| 999 | </div> | ||
| 1000 | </div> | ||
| 1001 | </div> | ||
| 1002 | <div class="range-block"> | ||
| 1003 | <div class="range-block-title" data-i18n="Top K"> | ||
| 1004 | Top K | ||
| 1005 | </div> | ||
| 1006 | <div class="range-block-range-and-counter"> | ||
| 1007 | <div class="range-block-range"> | ||
| 1008 | <input type="range" id="top_k_novel" name="volume" min="0" max="300" step="1"> | ||
| 1009 | </div> | ||
| 1010 | <div class="range-block-counter"> | ||
| 1011 | <input type="number" min="0" max="300" step="1" data-for="top_k_novel" id="top_k_counter_novel"> | ||
| 1012 | </div> | ||
| 1013 | </div> | ||
| 1014 | </div> | ||
| 1015 | <div class="range-block"> | ||
| 1016 | <div class="range-block-title" data-i18n="Mirostat Tau"> | ||
| 1017 | Mirostat Tau | ||
| 1018 | </div> | ||
| 1019 | <div class="range-block-range-and-counter"> | ||
| 1020 | <div class="range-block-range"> | ||
| 1021 | <input type="range" id="mirostat_tau_novel" name="volume" min="0" max="6" step="0.01"> | ||
| 1022 | </div> | ||
| 1023 | <div class="range-block-counter"> | ||
| 1024 | <input type="number" min="0" max="6" step="0.01" data-for="mirostat_tau_novel" id="mirostat_tau_counter_novel"> | ||
| 1025 | </div> | ||
| 1026 | </div> | ||
| 1027 | </div> | ||
| 1028 | <div class="range-block"> | ||
| 1029 | <div class="range-block-title" data-i18n="Mirostat LR"> | ||
| 1030 | Mirostat LR | ||
| 1031 | </div> | ||
| 1032 | <div class="range-block-range-and-counter"> | ||
| 1033 | <div class="range-block-range"> | ||
| 1034 | <input type="range" id="mirostat_lr_novel" name="volume" min="0" max="1" step="0.01"> | ||
| 1035 | </div> | ||
| 1036 | <div class="range-block-counter"> | ||
| 1037 | <input type="number" min="0" max="1" step="0.01" data-for="mirostat_lr_novel" id="mirostat_lr_counter_novel"> | ||
| 1038 | </div> | ||
| 1039 | </div> | ||
| 1040 | </div> | ||
| 1041 | <div class="range-block"> | ||
| 1042 | <div class="range-block-title" data-i18n="Typical P"> | ||
| 1043 | Typical P | ||
| 1044 | </div> | ||
| 1045 | <div class="range-block-range-and-counter"> | ||
| 1046 | <div class="range-block-range"> | ||
| 1047 | <input type="range" id="typical_p_novel" name="volume" min="0" max="1" step="0.001"> | ||
| 1048 | </div> | ||
| 1049 | <div class="range-block-counter"> | ||
| 1050 | <input type="number" min="0" max="1" step="0.001" data-for="typical_p_novel" id="typical_p_counter_novel"> | ||
| 1051 | </div> | ||
| 1052 | </div> | ||
| 1053 | </div> | ||
| 1054 | <div class="range-block"> | ||
| 1055 | <div class="range-block-title" data-i18n="Min Length"> | ||
| 1056 | Min Length | ||
| 1057 | </div> | ||
| 1058 | <div class="range-block-range-and-counter"> | ||
| 1059 | <div class="range-block-range"> | ||
| 1060 | <input type="range" id="min_length_novel" name="volume" min="1" max="150" step="1"> | ||
| 1061 | </div> | ||
| 1062 | <div class="range-block-counter"> | ||
| 1063 | <input type="number" min="1" max="150" step="1" data-for="min_length_novel" id="min_length_counter_novel"> | ||
| 1064 | </div> | ||
| 1065 | </div> | ||
| 1066 | </div> | ||
| 1067 | <div class="range-block flexFlowColumn"> | 1119 | <div class="range-block flexFlowColumn"> |
| 1068 | <div class="range-block-title"> | 1120 | <div class="range-block-title"> |
| 1069 | <span data-i18n="Samplers Order">Samplers Order</span> | 1121 | <span data-i18n="Samplers Order">Samplers Order</span> |
| @@ -1113,6 +1165,16 @@ | |||
| 1113 | <small>8</small> | 1165 | <small>8</small> |
| 1114 | <div class="toggle_button right_menu_button"></div> | 1166 | <div class="toggle_button right_menu_button"></div> |
| 1115 | </div> | 1167 | </div> |
| 1168 | <div data-id="9"> | ||
| 1169 | <span data-i18n="Unified Sampling">Unified Sampling</span> | ||
| 1170 | <small>9</small> | ||
| 1171 | <div class="toggle_button right_menu_button"></div> | ||
| 1172 | </div> | ||
| 1173 | <div data-id="10"> | ||
| 1174 | <span data-i18n="Min P">Min P</span> | ||
| 1175 | <small>10</small> | ||
| 1176 | <div class="toggle_button right_menu_button"></div> | ||
| 1177 | </div> | ||
| 1116 | </div> | 1178 | </div> |
| 1117 | </div> | 1179 | </div> |
| 1118 | </div><!-- end of novel settings--> | 1180 | </div><!-- end of novel settings--> |
| @@ -531,6 +531,19 @@ export function formatInstructModePrompt(name, isImpersonate, promptBias, name1, | |||
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | let sequence = getSequence() || ''; | 533 | let sequence = getSequence() || ''; |
| 534 | let nameFiller = ''; | ||
| 535 | |||
| 536 | // A hack for Mistral's formatting that has a normal output sequence ending with a space | ||
| 537 | if ( | ||
| 538 | includeNames && | ||
| 539 | power_user.instruct.last_output_sequence && | ||
| 540 | power_user.instruct.output_sequence && | ||
| 541 | sequence === power_user.instruct.last_output_sequence && | ||
| 542 | /\s$/.test(power_user.instruct.output_sequence) && | ||
| 543 | !/\s$/.test(power_user.instruct.last_output_sequence) | ||
| 544 | ) { | ||
| 545 | nameFiller = power_user.instruct.output_sequence.slice(-1); | ||
| 546 | } | ||
| 534 | 547 | ||
| 535 | if (power_user.instruct.macro) { | 548 | if (power_user.instruct.macro) { |
| 536 | sequence = substituteParams(sequence, name1, name2); | 549 | sequence = substituteParams(sequence, name1, name2); |
| @@ -538,7 +551,7 @@ export function formatInstructModePrompt(name, isImpersonate, promptBias, name1, | |||
| 538 | } | 551 | } |
| 539 | 552 | ||
| 540 | const separator = power_user.instruct.wrap ? '\n' : ''; | 553 | const separator = power_user.instruct.wrap ? '\n' : ''; |
| 541 | let text = includeNames ? (separator + sequence + separator + `${name}:`) : (separator + sequence); | 554 | let text = includeNames ? (separator + sequence + separator + nameFiller + `${name}:`) : (separator + sequence); |
| 542 | 555 | ||
| 543 | // Quiet prompt already has a newline at the end | 556 | // Quiet prompt already has a newline at the end |
| 544 | if (isQuiet && separator) { | 557 | if (isQuiet && separator) { |
| @@ -38,6 +38,10 @@ export const nai_settings = { | |||
| 38 | top_p: 0.75, | 38 | top_p: 0.75, |
| 39 | top_a: 0.08, | 39 | top_a: 0.08, |
| 40 | typical_p: 0.975, | 40 | typical_p: 0.975, |
| 41 | min_p: 0, | ||
| 42 | math1_temp: 1, | ||
| 43 | math1_quad: 0, | ||
| 44 | math1_quad_entropy_scale: 0, | ||
| 41 | min_length: 1, | 45 | min_length: 1, |
| 42 | model_novel: 'clio-v1', | 46 | model_novel: 'clio-v1', |
| 43 | preset_settings_novel: 'Talker-Chat-Clio', | 47 | preset_settings_novel: 'Talker-Chat-Clio', |
| @@ -151,6 +155,10 @@ export function loadNovelPreset(preset) { | |||
| 151 | nai_settings.order = preset.order || default_order; | 155 | nai_settings.order = preset.order || default_order; |
| 152 | nai_settings.logit_bias = preset.logit_bias || []; | 156 | nai_settings.logit_bias = preset.logit_bias || []; |
| 153 | nai_settings.preamble = preset.preamble || default_preamble; | 157 | nai_settings.preamble = preset.preamble || default_preamble; |
| 158 | nai_settings.min_p = preset.min_p || 0; | ||
| 159 | nai_settings.math1_temp = preset.math1_temp || 1; | ||
| 160 | nai_settings.math1_quad = preset.math1_quad || 0; | ||
| 161 | nai_settings.math1_quad_entropy_scale = preset.math1_quad_entropy_scale || 0; | ||
| 154 | loadNovelSettingsUi(nai_settings); | 162 | loadNovelSettingsUi(nai_settings); |
| 155 | } | 163 | } |
| 156 | 164 | ||
| @@ -188,6 +196,10 @@ export function loadNovelSettings(settings) { | |||
| 188 | nai_settings.banned_tokens = settings.banned_tokens || ''; | 196 | nai_settings.banned_tokens = settings.banned_tokens || ''; |
| 189 | nai_settings.order = settings.order || default_order; | 197 | nai_settings.order = settings.order || default_order; |
| 190 | nai_settings.logit_bias = settings.logit_bias || []; | 198 | nai_settings.logit_bias = settings.logit_bias || []; |
| 199 | nai_settings.min_p = settings.min_p || 0; | ||
| 200 | nai_settings.math1_temp = settings.math1_temp || 1; | ||
| 201 | nai_settings.math1_quad = settings.math1_quad || 0; | ||
| 202 | nai_settings.math1_quad_entropy_scale = settings.math1_quad_entropy_scale || 0; | ||
| 191 | loadNovelSettingsUi(nai_settings); | 203 | loadNovelSettingsUi(nai_settings); |
| 192 | } | 204 | } |
| 193 | 205 | ||
| @@ -227,6 +239,14 @@ function loadNovelSettingsUi(ui_settings) { | |||
| 227 | $('#nai_prefix').val(ui_settings.prefix || 'vanilla'); | 239 | $('#nai_prefix').val(ui_settings.prefix || 'vanilla'); |
| 228 | $('#nai_cfg_uc').val(ui_settings.cfg_uc || ''); | 240 | $('#nai_cfg_uc').val(ui_settings.cfg_uc || ''); |
| 229 | $('#nai_banned_tokens').val(ui_settings.banned_tokens || ''); | 241 | $('#nai_banned_tokens').val(ui_settings.banned_tokens || ''); |
| 242 | $('#min_p_novel').val(ui_settings.min_p); | ||
| 243 | $('#min_p_counter_novel').val(Number(ui_settings.min_p).toFixed(3)); | ||
| 244 | $('#math1_temp_novel').val(ui_settings.math1_temp); | ||
| 245 | $('#math1_temp_counter_novel').val(Number(ui_settings.math1_temp).toFixed(2)); | ||
| 246 | $('#math1_quad_novel').val(ui_settings.math1_quad); | ||
| 247 | $('#math1_quad_counter_novel').val(Number(ui_settings.math1_quad).toFixed(2)); | ||
| 248 | $('#math1_quad_entropy_scale_novel').val(ui_settings.math1_quad_entropy_scale); | ||
| 249 | $('#math1_quad_entropy_scale_counter_novel').val(Number(ui_settings.math1_quad_entropy_scale).toFixed(2)); | ||
| 230 | 250 | ||
| 231 | $('#streaming_novel').prop('checked', ui_settings.streaming_novel); | 251 | $('#streaming_novel').prop('checked', ui_settings.streaming_novel); |
| 232 | sortItemsByOrder(ui_settings.order); | 252 | sortItemsByOrder(ui_settings.order); |
| @@ -336,6 +356,30 @@ const sliders = [ | |||
| 336 | format: (val) => val, | 356 | format: (val) => val, |
| 337 | setValue: (val) => { nai_settings.banned_tokens = val; }, | 357 | setValue: (val) => { nai_settings.banned_tokens = val; }, |
| 338 | }, | 358 | }, |
| 359 | { | ||
| 360 | sliderId: '#min_p_novel', | ||
| 361 | counterId: '#min_p_counter_novel', | ||
| 362 | format: (val) => Number(val).toFixed(3), | ||
| 363 | setValue: (val) => { nai_settings.min_p = Number(val); }, | ||
| 364 | }, | ||
| 365 | { | ||
| 366 | sliderId: '#math1_temp_novel', | ||
| 367 | counterId: '#math1_temp_counter_novel', | ||
| 368 | format: (val) => Number(val).toFixed(2), | ||
| 369 | setValue: (val) => { nai_settings.math1_temp = Number(val); }, | ||
| 370 | }, | ||
| 371 | { | ||
| 372 | sliderId: '#math1_quad_novel', | ||
| 373 | counterId: '#math1_quad_counter_novel', | ||
| 374 | format: (val) => Number(val).toFixed(2), | ||
| 375 | setValue: (val) => { nai_settings.math1_quad = Number(val); }, | ||
| 376 | }, | ||
| 377 | { | ||
| 378 | sliderId: '#math1_quad_entropy_scale_novel', | ||
| 379 | counterId: '#math1_quad_entropy_scale_counter_novel', | ||
| 380 | format: (val) => Number(val).toFixed(2), | ||
| 381 | setValue: (val) => { nai_settings.math1_quad_entropy_scale = Number(val); }, | ||
| 382 | }, | ||
| 339 | ]; | 383 | ]; |
| 340 | 384 | ||
| 341 | function getBadWordIds(banned_tokens, tokenizerType) { | 385 | function getBadWordIds(banned_tokens, tokenizerType) { |
| @@ -469,6 +513,10 @@ export function getNovelGenerationData(finalPrompt, settings, maxLength, isImper | |||
| 469 | 'top_a': Number(nai_settings.top_a), | 513 | 'top_a': Number(nai_settings.top_a), |
| 470 | 'top_p': Number(nai_settings.top_p), | 514 | 'top_p': Number(nai_settings.top_p), |
| 471 | 'top_k': Number(nai_settings.top_k), | 515 | 'top_k': Number(nai_settings.top_k), |
| 516 | 'min_p': Number(nai_settings.min_p), | ||
| 517 | 'math1_temp': Number(nai_settings.math1_temp), | ||
| 518 | 'math1_quad': Number(nai_settings.math1_quad), | ||
| 519 | 'math1_quad_entropy_scale': Number(nai_settings.math1_quad_entropy_scale), | ||
| 472 | 'typical_p': Number(nai_settings.typical_p), | 520 | 'typical_p': Number(nai_settings.typical_p), |
| 473 | 'mirostat_lr': Number(nai_settings.mirostat_lr), | 521 | 'mirostat_lr': Number(nai_settings.mirostat_lr), |
| 474 | 'mirostat_tau': Number(nai_settings.mirostat_tau), | 522 | 'mirostat_tau': Number(nai_settings.mirostat_tau), |
| @@ -175,6 +175,10 @@ router.post('/generate', jsonParser, async function (req, res) { | |||
| 175 | 'prefix': req.body.prefix, | 175 | 'prefix': req.body.prefix, |
| 176 | 'order': req.body.order, | 176 | 'order': req.body.order, |
| 177 | 'num_logprobs': req.body.num_logprobs, | 177 | 'num_logprobs': req.body.num_logprobs, |
| 178 | 'min_p': req.body.min_p, | ||
| 179 | 'math1_temp': req.body.math1_temp, | ||
| 180 | 'math1_quad': req.body.math1_quad, | ||
| 181 | 'math1_quad_entropy_scale': req.body.math1_quad_entropy_scale, | ||
| 178 | }, | 182 | }, |
| 179 | }; | 183 | }; |
| 180 | 184 | ||