Enter the Kalo Zone

This commit is contained in:
Alexander Abushady 2024-01-28 15:14:21 -05:00
parent f732b8ae4c
commit 92aae0da04
3 changed files with 35 additions and 2 deletions

View File

@ -1330,7 +1330,23 @@
<input class="neo-range-input" type="number" min="0" max="5" step="1" data-for="prompt_log_probs_aphrodite" id="prompt_log_probs_aphrodite_counter_textgenerationwebui">
</div>
-->
<div data-newbie-hidden data-tg-type="ooba, koboldcpp" name="dynaTempBlock" class="wide100p">
<div data-newbie-hidden data-tg-type="ooba, koboldcpp, llamacpp" name="Kalo Zone" class="wide100p">
<h4 class="range-block-title justifyCenter">
<span data-i18n="Kalo Zone">Kalo Zone</span>
<div class="margin5 fa-solid fa-circle-info opacity50p " title="Enter the Kalo Zone."></div>
</h4>
<div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">
<small data-i18n="Randomization Factor">Randomization Factor</small>
<input class="neo-range-slider" type="range" id="randomization_factor_textgenerationwebui" name="volume" min="0" max="5" step="0.01" />
<input class="neo-range-input" type="number" min="0" max="5" step="0.01" data-for="randomization_factor_textgenerationwebui" id="randomization_factor_counter_textgenerationwebui">
</div>
<div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">
<small data-i18n="Smoothing Factor">Smoothing Factor</small>
<input class="neo-range-slider" type="range" id="smoothing_factor_textgenerationwebui" name="volume" min="0" max="5" step="0.01" />
<input class="neo-range-input" type="number" min="0" max="5" step="0.01" data-for="smoothing_factor_textgenerationwebui" id="smoothing_factor_counter_textgenerationwebui">
</div>
</div>
<div data-newbie-hidden data-tg-type="ooba, koboldcpp, llamacpp" name="dynaTempBlock" class="wide100p">
<h4 class="wide100p textAlignCenter" data-i18n="DynaTemp">
<div class="flex-container alignitemscenter" style="justify-content: center;">
<div class="checkbox_label" for="dynatemp_textgenerationwebui">
@ -1352,6 +1368,11 @@
<input class="neo-range-slider" type="range" id="max_temp_textgenerationwebui" name="volume" min="0" max="5" step="0.01" />
<input class="neo-range-input" type="number" min="0" max="5" step="0.01" data-for="max_temp_textgenerationwebui" id="max_temp_counter_textgenerationwebui">
</div>
<div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">
<small data-i18n="Exponent">Exponent</small>
<input class="neo-range-slider" type="range" id="dynatemp_exponent_textgenerationwebui" name="volume" min="1" max="10" step="0.01" />
<input class="neo-range-input" type="number" min="1" max="10" step="0.01" data-for="dynatemp_exponent_textgenerationwebui" id="dynatemp_exponent_counter_textgenerationwebui">
</div>
</div>
</div>
<div data-newbie-hidden name="miroStatBlock" class="wide100p">

View File

@ -611,7 +611,10 @@ async function CreateZenSliders(elmnt) {
decimals = 0;
}
if (sliderID == 'min_temp_textgenerationwebui' ||
sliderID == 'max_temp_textgenerationwebui') {
sliderID == 'max_temp_textgenerationwebui' ||
sliderID == 'dynatemp_exponent_textgenerationwebui' ||
sliderID == 'smoothing_factor_textgenerationwebui' ||
sliderID == 'randomization_factor_textgenerationwebui') {
decimals = 2;
}
if (sliderID == 'eta_cutoff_textgenerationwebui' ||

View File

@ -79,6 +79,9 @@ const settings = {
dynatemp: false,
min_temp: 0,
max_temp: 2.0,
dynatemp_exponent: 1.0,
randomization_factor: 0.0,
smoothing_factor: 0.0,
seed: -1,
preset: 'Default',
add_bos_token: true,
@ -140,6 +143,9 @@ const setting_names = [
'dynatemp',
'min_temp',
'max_temp',
'dynatemp_exponent',
'randomization_factor',
'smoothing_factor',
'encoder_rep_pen',
'freq_pen',
'presence_pen',
@ -818,6 +824,9 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'dynatemp_low': settings.min_temp,
'dynatemp_high': settings.max_temp,
'dynatemp_range': settings.dynatemp ? (settings.max_temp - settings.min_temp) / 2 : 0,
'dynatemp_exponent': settings.dynatemp_exponent,
'randomization_factor': settings.randomization_factor,
'smoothing_factor': settings.smoothing_factor,
'stopping_strings': getStoppingStrings(isImpersonate, isContinue),
'stop': getStoppingStrings(isImpersonate, isContinue),
'truncation_length': max_context,