From ff680f46cceff433b12fd030febbed6e3dc7e5c0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:05:41 +0300 Subject: [PATCH] Add rep_pen_slope control for koboldcpp --- public/index.html | 5 +++++ public/scripts/power-user.js | 1 + public/scripts/textgen-settings.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/public/index.html b/public/index.html index 43efe650c..8bc47dc24 100644 --- a/public/index.html +++ b/public/index.html @@ -1228,6 +1228,11 @@ +
+ Rep Pen Slope + + +
Rep Pen Decay diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 39aef63f2..1ff08bfe6 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -771,6 +771,7 @@ async function CreateZenSliders(elmnt) { sliderID == 'max_temp_textgenerationwebui' || sliderID == 'dynatemp_exponent_textgenerationwebui' || sliderID == 'guidance_scale_textgenerationwebui' || + sliderID == 'rep_pen_slope_textgenerationwebui' || sliderID == 'guidance_scale') { offVal = 1; } diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index cf61b3daa..dac12be1c 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -101,6 +101,7 @@ const settings = { rep_pen: 1.2, rep_pen_range: 0, rep_pen_decay: 0, + rep_pen_slope: 1, no_repeat_ngram_size: 0, penalty_alpha: 0, num_beams: 1, @@ -180,6 +181,7 @@ export const setting_names = [ 'rep_pen', 'rep_pen_range', 'rep_pen_decay', + 'rep_pen_slope', 'no_repeat_ngram_size', 'top_k', 'top_p', @@ -1105,6 +1107,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'mirostat': settings.mirostat_mode, 'ignore_eos': settings.ban_eos_token, 'n_probs': power_user.request_token_probabilities ? 10 : undefined, + 'rep_pen_slope': settings.rep_pen_slope, }; const vllmParams = { 'n': canMultiSwipe ? settings.n : 1,