From ec4cff72fe7970d6c5565b10b1de273a6b7651a9 Mon Sep 17 00:00:00 2001 From: AlpinDale Date: Tue, 19 Nov 2024 23:05:23 +0000 Subject: [PATCH 1/5] feat: add top nsigma sampler support --- public/index.html | 8 ++++++++ public/scripts/power-user.js | 7 +++++++ public/scripts/textgen-settings.js | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/public/index.html b/public/index.html index 7833b86a7..517ea31db 100644 --- a/public/index.html +++ b/public/index.html @@ -1294,6 +1294,14 @@ +
+ + Top nsigma +
+
+ + +
Eta Cutoff diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 7aad214be..dc844826e 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -639,6 +639,11 @@ async function CreateZenSliders(elmnt) { numSteps = 50; decimals = 1; } + if (sliderID == 'nsigma' || + sliderID == 'nsigma') { + numSteps = 50; + decimals = 1; + } //customize steps if (sliderID == 'mirostat_mode_textgenerationwebui' || sliderID == 'mirostat_mode_kobold') { @@ -655,6 +660,7 @@ async function CreateZenSliders(elmnt) { sliderID == 'num_beams_textgenerationwebui' || sliderID == 'no_repeat_ngram_size_textgenerationwebui' || sliderID == 'epsilon_cutoff_textgenerationwebui' || + sliderID == 'nsigma' || sliderID == 'tfs_textgenerationwebui' || sliderID == 'min_p_textgenerationwebui' || sliderID == 'temp_textgenerationwebui' || @@ -683,6 +689,7 @@ async function CreateZenSliders(elmnt) { sliderID == 'penalty_alpha_textgenerationwebui' || sliderID == 'length_penalty_textgenerationwebui' || sliderID == 'epsilon_cutoff_textgenerationwebui' || + sliderID == 'nsigma' || sliderID == 'rep_pen_range' || sliderID == 'eta_cutoff_textgenerationwebui' || sliderID == 'top_a_textgenerationwebui' || diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 67e058f08..2dbf2138c 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -193,6 +193,7 @@ const settings = { openrouter_allow_fallbacks: true, xtc_threshold: 0.1, xtc_probability: 0, + nsigma: 0.0, featherless_model: '', }; @@ -265,6 +266,7 @@ export const setting_names = [ 'openrouter_allow_fallbacks', 'xtc_threshold', 'xtc_probability', + 'nsigma', ]; const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba'); @@ -1178,6 +1180,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined, 'xtc_threshold': settings.xtc_threshold, 'xtc_probability': settings.xtc_probability, + 'nsigma': settings.nsigma, }; const nonAphroditeParams = { 'rep_pen': settings.rep_pen, @@ -1245,6 +1248,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'dynatemp_exponent': dynatemp ? settings.dynatemp_exponent : undefined, 'xtc_threshold': settings.xtc_threshold, 'xtc_probability': settings.xtc_probability, + 'nsigma': settings.nsigma, 'custom_token_bans': toIntArray(banned_tokens), }; From f3e4d822843b8189fc605b88e682209d1211a9b4 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 24 Nov 2024 17:40:46 +0200 Subject: [PATCH 2/5] Clean-up zen sliders --- public/scripts/power-user.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index dc844826e..230e824a0 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -639,11 +639,10 @@ async function CreateZenSliders(elmnt) { numSteps = 50; decimals = 1; } - if (sliderID == 'nsigma' || - sliderID == 'nsigma') { + if (sliderID == 'nsigma') { numSteps = 50; decimals = 1; - } + } //customize steps if (sliderID == 'mirostat_mode_textgenerationwebui' || sliderID == 'mirostat_mode_kobold') { @@ -660,7 +659,6 @@ async function CreateZenSliders(elmnt) { sliderID == 'num_beams_textgenerationwebui' || sliderID == 'no_repeat_ngram_size_textgenerationwebui' || sliderID == 'epsilon_cutoff_textgenerationwebui' || - sliderID == 'nsigma' || sliderID == 'tfs_textgenerationwebui' || sliderID == 'min_p_textgenerationwebui' || sliderID == 'temp_textgenerationwebui' || From cec4519dcb7ce542db44778fde4e8e4f6a8e438c Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 25 Nov 2024 00:09:41 +0200 Subject: [PATCH 3/5] Fix nsigma control id --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 993a51ecf..97cda4bbe 100644 --- a/public/index.html +++ b/public/index.html @@ -1296,7 +1296,7 @@ Top nsigma
- +
From 91437ad52f5e2d9908e810b1d4191c25ca78c788 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 25 Nov 2024 00:11:07 +0200 Subject: [PATCH 4/5] Fix counter link --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 97cda4bbe..6c90ff965 100644 --- a/public/index.html +++ b/public/index.html @@ -1297,7 +1297,7 @@
- +
From 4b306c5ef848927a35f597c90ae4409a2b39d325 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 25 Nov 2024 00:13:36 +0200 Subject: [PATCH 5/5] Fix title --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 6c90ff965..2791dbd70 100644 --- a/public/index.html +++ b/public/index.html @@ -1294,7 +1294,7 @@
Top nsigma -
+