Add repetition penalty range for ooba

This commit is contained in:
ThisIsPIRI 2023-07-22 07:38:35 +09:00
parent 7205255d18
commit e2f1f4a57a
2 changed files with 18 additions and 0 deletions

View File

@ -440,6 +440,21 @@
</div>
</div>
</div>
<div class="range-block">
<div class="range-block-title" data-i18n="rep.pen range">
Rep. Pen. Range
</div>
<div class="range-block-range-and-counter">
<div class="range-block-range">
<input type="range" id="rep_pen_range_textgenerationwebui" name="volume" min="0" max="4096" step="1">
</div>
<div class="range-block-counter">
<div contenteditable="true" data-for="rep_pen_range_textgenerationwebui" id="rep_pen_range_counter_textgenerationwebui">
select
</div>
</div>
</div>
</div>
<div class="range-block">
<div class="range-block-title" data-i18n="Encoder Rep. Pen.">
Encoder Rep. Pen.

View File

@ -21,6 +21,7 @@ let textgenerationwebui_settings = {
eta_cutoff: 0,
typical_p: 1,
rep_pen: 1.2,
rep_pen_range: 0,
no_repeat_ngram_size: 0,
penalty_alpha: 0,
num_beams: 1,
@ -49,6 +50,7 @@ let textgenerationwebui_preset_names = [];
const setting_names = [
"temp",
"rep_pen",
"rep_pen_range",
"no_repeat_ngram_size",
"top_k",
"top_p",
@ -212,6 +214,7 @@ export function getTextGenGenerationData(finalPromt, this_amount_gen, isImperson
'top_p': textgenerationwebui_settings.top_p,
'typical_p': textgenerationwebui_settings.typical_p,
'repetition_penalty': textgenerationwebui_settings.rep_pen,
'repetition_penalty_range': textgenerationwebui_settings.rep_pen_range,
'encoder_repetition_penalty': textgenerationwebui_settings.encoder_rep_pen,
'top_k': textgenerationwebui_settings.top_k,
'min_length': textgenerationwebui_settings.min_length,