diff --git a/public/index.html b/public/index.html index c7f6a041d..41e71abf0 100644 --- a/public/index.html +++ b/public/index.html @@ -1161,8 +1161,8 @@ Temperature
- - + +
@@ -1270,6 +1270,30 @@
--> +
+

+
+
+ + +
+ Dynamic Temperature +
+
+

+
+
+ Minimum Temp + + +
+
+ Maximum Temp + + +
+
+

Mirostat
@@ -1315,18 +1339,6 @@

-
-

DynaTemp -
-

-
-
- DynaTemp Range - - -
-
-

Contrast Search
diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 035ed9d83..1f40c72b2 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -608,7 +608,8 @@ async function CreateZenSliders(elmnt) { sliderID == 'rep_pen_range') { decimals = 0; } - if (sliderID == 'dynatemp_range_textgenerationwebui') { + if (sliderID == 'min_temp_textgenerationwebui' || + sliderID == 'max_temp_textgenerationwebui') { decimals = 2; } if (sliderID == 'eta_cutoff_textgenerationwebui' || @@ -635,13 +636,14 @@ async function CreateZenSliders(elmnt) { sliderID == 'tfs_textgenerationwebui' || sliderID == 'min_p_textgenerationwebui' || sliderID == 'temp_textgenerationwebui' || - sliderID == 'temp' || - sliderID == 'dynatemp_range_textgenerationwebui') { + sliderID == 'temp') { numSteps = 20; } if (sliderID == 'mirostat_eta_textgenerationwebui' || sliderID == 'penalty_alpha_textgenerationwebui' || - sliderID == 'length_penalty_textgenerationwebui') { + sliderID == 'length_penalty_textgenerationwebui' || + sliderID == 'min_temp_textgenerationwebui' || + sliderID == 'max_temp_textgenerationwebui') { numSteps = 50; } //customize off values diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index ed834c38a..037bb1b5d 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -79,7 +79,9 @@ const settings = { presence_pen: 0, do_sample: true, early_stopping: false, - dynatemp_range: 0, + dynatemp: false, + min_temp: 0, + max_temp: 2.0, seed: -1, preset: 'Default', add_bos_token: true, @@ -138,7 +140,9 @@ const setting_names = [ 'num_beams', 'length_penalty', 'min_length', - 'dynatemp_range', + 'dynatemp', + 'min_temp', + 'max_temp', 'encoder_rep_pen', 'freq_pen', 'presence_pen', @@ -706,7 +710,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'model': getModel(), 'max_new_tokens': maxTokens, 'max_tokens': maxTokens, - 'temperature': settings.temp, + 'temperature': settings.dynatemp ? (settings.min_temp + settings.max_temp) / 2 : settings.temp, 'top_p': settings.top_p, 'typical_p': settings.typical_p, 'min_p': settings.min_p, @@ -720,7 +724,10 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'length_penalty': settings.length_penalty, 'early_stopping': settings.early_stopping, 'add_bos_token': settings.add_bos_token, - 'dynatemp_range': settings.dynatemp_range, + 'dynamic_temperature': settings.dynatemp, + 'dynatemp_low': settings.min_temp, + 'dynatemp_high': settings.max_temp, + 'dynatemp_range': settings.dynatemp ? (settings.max_temp - settings.min_temp) / 2 : 0, 'stopping_strings': getStoppingStrings(isImpersonate, isContinue), 'stop': getStoppingStrings(isImpersonate, isContinue), 'truncation_length': max_context,