mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-04-04 06:01:07 +02:00
Min P for Ooba, fix preset loading for ZenSliders
This commit is contained in:
parent
19c0100983
commit
937c5d7e5f
@ -1305,6 +1305,11 @@
|
|||||||
<input class="neo-range-slider" type="range" id="typical_p_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
|
<input class="neo-range-slider" type="range" id="typical_p_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
|
||||||
<input class="neo-range-input" type="number" min="0" max="1" step="0.01" data-for="typical_p_textgenerationwebui" id="typical_p_counter_textgenerationwebui">
|
<input class="neo-range-input" type="number" min="0" max="1" step="0.01" data-for="typical_p_textgenerationwebui" id="typical_p_counter_textgenerationwebui">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-i18n="Min P">
|
||||||
|
<small>Min P</small>
|
||||||
|
<input class="neo-range-slider" type="range" id="min_p_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
|
||||||
|
<input class="neo-range-input" type="number" min="0" max="1" step="0.05" data-for="min_p_textgenerationwebui" id="min_p_counter_textgenerationwebui">
|
||||||
|
</div>
|
||||||
<div class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-i18n="Top A">
|
<div class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-i18n="Top A">
|
||||||
<small>Top A</small>
|
<small>Top A</small>
|
||||||
<input class="neo-range-slider" type="range" id="top_a_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
|
<input class="neo-range-slider" type="range" id="top_a_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
|
||||||
@ -5054,4 +5059,4 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -496,7 +496,8 @@ async function switchZenSliders() {
|
|||||||
numSteps = 20
|
numSteps = 20
|
||||||
decimals = 1
|
decimals = 1
|
||||||
}
|
}
|
||||||
if (sliderID == 'tfs_textgenerationwebui') {
|
if (sliderID == 'tfs_textgenerationwebui' ||
|
||||||
|
sliderID == 'min_p_textgenerationwebui') {
|
||||||
numSteps = 20
|
numSteps = 20
|
||||||
decimals = 2
|
decimals = 2
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ const textgenerationwebui_settings = {
|
|||||||
epsilon_cutoff: 0,
|
epsilon_cutoff: 0,
|
||||||
eta_cutoff: 0,
|
eta_cutoff: 0,
|
||||||
typical_p: 1,
|
typical_p: 1,
|
||||||
|
min_p: 0,
|
||||||
rep_pen: 1.2,
|
rep_pen: 1.2,
|
||||||
rep_pen_range: 0,
|
rep_pen_range: 0,
|
||||||
no_repeat_ngram_size: 0,
|
no_repeat_ngram_size: 0,
|
||||||
@ -91,6 +92,7 @@ const setting_names = [
|
|||||||
"epsilon_cutoff",
|
"epsilon_cutoff",
|
||||||
"eta_cutoff",
|
"eta_cutoff",
|
||||||
"typical_p",
|
"typical_p",
|
||||||
|
"min_p",
|
||||||
"penalty_alpha",
|
"penalty_alpha",
|
||||||
"num_beams",
|
"num_beams",
|
||||||
"length_penalty",
|
"length_penalty",
|
||||||
@ -122,7 +124,7 @@ const setting_names = [
|
|||||||
//'prompt_log_probs_aphrodite'
|
//'prompt_log_probs_aphrodite'
|
||||||
];
|
];
|
||||||
|
|
||||||
function selectPreset(name) {
|
async function selectPreset(name) {
|
||||||
const preset = textgenerationwebui_presets[textgenerationwebui_preset_names.indexOf(name)];
|
const preset = textgenerationwebui_presets[textgenerationwebui_preset_names.indexOf(name)];
|
||||||
|
|
||||||
if (!preset) {
|
if (!preset) {
|
||||||
@ -351,6 +353,14 @@ function setSettingByName(i, value, trigger) {
|
|||||||
const val = parseFloat(value);
|
const val = parseFloat(value);
|
||||||
$(`#${i}_textgenerationwebui`).val(val);
|
$(`#${i}_textgenerationwebui`).val(val);
|
||||||
$(`#${i}_counter_textgenerationwebui`).val(val);
|
$(`#${i}_counter_textgenerationwebui`).val(val);
|
||||||
|
if (power_user.enableZenSliders) {
|
||||||
|
let zenSlider = $(`#${i}_textgenerationwebui_zenslider`).slider()
|
||||||
|
zenSlider.slider('option', 'value', val)
|
||||||
|
zenSlider.slider('option', 'slide')
|
||||||
|
.call(zenSlider, null, {
|
||||||
|
handle: $('.ui-slider-handle', zenSlider), value: val
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trigger) {
|
if (trigger) {
|
||||||
@ -448,6 +458,7 @@ export function getTextGenGenerationData(finalPrompt, this_amount_gen, isImperso
|
|||||||
'temperature': textgenerationwebui_settings.temp,
|
'temperature': textgenerationwebui_settings.temp,
|
||||||
'top_p': textgenerationwebui_settings.top_p,
|
'top_p': textgenerationwebui_settings.top_p,
|
||||||
'typical_p': textgenerationwebui_settings.typical_p,
|
'typical_p': textgenerationwebui_settings.typical_p,
|
||||||
|
'min_p': textgenerationwebui_settings.min_p,
|
||||||
'repetition_penalty': textgenerationwebui_settings.rep_pen,
|
'repetition_penalty': textgenerationwebui_settings.rep_pen,
|
||||||
'repetition_penalty_range': textgenerationwebui_settings.rep_pen_range,
|
'repetition_penalty_range': textgenerationwebui_settings.rep_pen_range,
|
||||||
'encoder_repetition_penalty': textgenerationwebui_settings.encoder_rep_pen,
|
'encoder_repetition_penalty': textgenerationwebui_settings.encoder_rep_pen,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user