From a5fea35f12457347c39bdc9fb97f7121486bc386 Mon Sep 17 00:00:00 2001 From: AlpinDale Date: Sat, 21 Sep 2024 08:18:06 +0000 Subject: [PATCH] chore: update aphrodite samplers --- public/index.html | 4 ++-- public/scripts/textgen-settings.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/public/index.html b/public/index.html index 26de88a79..f306f5a1f 100644 --- a/public/index.html +++ b/public/index.html @@ -1341,7 +1341,7 @@ -
+

@@ -1401,7 +1401,7 @@

-
+

diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 1033ee005..2b7591f06 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -1203,7 +1203,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'repetition_penalty': settings.rep_pen, 'seed': settings.seed >= 0 ? settings.seed : undefined, 'stop': getStoppingStrings(isImpersonate, isContinue), - 'temperature': settings.temp, + 'temperature': dynatemp ? (settings.min_temp + settings.max_temp) / 2 : settings.temp, 'temperature_last': settings.temperature_last, 'top_p': settings.top_p, 'top_k': settings.top_k, @@ -1223,6 +1223,14 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'guided_json': settings.json_schema, 'early_stopping': false, // hacks 'include_stop_str_in_output': false, + 'dynatemp_min': dynatemp ? settings.min_temp : undefined, + 'dynatemp_max': dynatemp ? settings.max_temp : undefined, + 'dynatemp_exponent': dynatemp ? settings.dynatemp_exponent : undefined, + 'xtc_threshold': settings.xtc_threshold, + 'xtc_probability': settings.xtc_probability, + 'custom_token_bans': [APHRODITE, MANCER].includes(settings.type) ? + toIntArray(banned_tokens) : + banned_tokens, }; if (settings.type === OPENROUTER) {