mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
added xtc parameter for ooba
This commit is contained in:
@ -1291,6 +1291,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div data-newbie-hidden data-tg-type="ooba" id="xtc_block" class="wide100p">
|
||||||
|
<h4 class="wide100p textAlignCenter">
|
||||||
|
<label data-i18n="XTC Parameters">XTC Parameters</label>
|
||||||
|
<div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]XTC_Parameters_desc" title="XTC (eXtreme Tail Cutting) parameters for controlling token sampling"></div>
|
||||||
|
</h4>
|
||||||
|
<div class="flex-container flexFlowRow gap10px flexShrink">
|
||||||
|
<div class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
|
||||||
|
<small data-i18n="XTC Threshold">XTC Threshold</small>
|
||||||
|
<input class="neo-range-slider" type="range" id="xtc_threshold_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="xtc_threshold_textgenerationwebui" id="xtc_threshold_counter_textgenerationwebui">
|
||||||
|
</div>
|
||||||
|
<div class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
|
||||||
|
<small data-i18n="XTC Probability">XTC Probability</small>
|
||||||
|
<input class="neo-range-slider" type="range" id="xtc_probability_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="xtc_probability_textgenerationwebui" id="xtc_probability_counter_textgenerationwebui">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Enable for llama.cpp when the PR is merged: https://github.com/ggerganov/llama.cpp/pull/6839 -->
|
<!-- Enable for llama.cpp when the PR is merged: https://github.com/ggerganov/llama.cpp/pull/6839 -->
|
||||||
<div data-newbie-hidden data-tg-type="ooba, koboldcpp" id="dryBlock" class="wide100p">
|
<div data-newbie-hidden data-tg-type="ooba, koboldcpp" id="dryBlock" class="wide100p">
|
||||||
<h4 class="wide100p textAlignCenter" title="DRY penalizes tokens that would extend the end of the input into a sequence that has previously occurred in the input. Set multiplier to 0 to disable." data-i18n="[title]DRY_Repetition_Penalty_desc">
|
<h4 class="wide100p textAlignCenter" title="DRY penalizes tokens that would extend the end of the input into a sequence that has previously occurred in the input. Set multiplier to 0 to disable." data-i18n="[title]DRY_Repetition_Penalty_desc">
|
||||||
@ -1640,6 +1660,7 @@
|
|||||||
<div data-name="top_a" draggable="true"><span>Top A</span><small></small></div>
|
<div data-name="top_a" draggable="true"><span>Top A</span><small></small></div>
|
||||||
<div data-name="min_p" draggable="true"><span>Min P</span><small></small></div>
|
<div data-name="min_p" draggable="true"><span>Min P</span><small></small></div>
|
||||||
<div data-name="mirostat" draggable="true"><span>Mirostat</span><small></small></div>
|
<div data-name="mirostat" draggable="true"><span>Mirostat</span><small></small></div>
|
||||||
|
<div data-name="xtc" draggable="true"><span>XTC</span><small></small></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="textgenerationwebui_default_order" class="menu_button menu_button_icon">
|
<div id="textgenerationwebui_default_order" class="menu_button menu_button_icon">
|
||||||
<span data-i18n="Load default order">Load default order</span>
|
<span data-i18n="Load default order">Load default order</span>
|
||||||
|
@ -704,6 +704,21 @@ async function CreateZenSliders(elmnt) {
|
|||||||
sliderID == 'dry_base_textgenerationwebui') {
|
sliderID == 'dry_base_textgenerationwebui') {
|
||||||
decimals = 2;
|
decimals = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sliderID == 'xtc_threshold_textgenerationwebui') {
|
||||||
|
numSteps = 100;
|
||||||
|
decimals = 2;
|
||||||
|
sliderMin = 0;
|
||||||
|
sliderMax = 1;
|
||||||
|
stepScale = 0.01;
|
||||||
|
}
|
||||||
|
if (sliderID == 'xtc_probability_textgenerationwebui') {
|
||||||
|
numSteps = 100;
|
||||||
|
decimals = 2;
|
||||||
|
sliderMin = 0;
|
||||||
|
sliderMax = 1;
|
||||||
|
stepScale = 0.01;
|
||||||
|
}
|
||||||
if (sliderID == 'eta_cutoff_textgenerationwebui' ||
|
if (sliderID == 'eta_cutoff_textgenerationwebui' ||
|
||||||
sliderID == 'epsilon_cutoff_textgenerationwebui') {
|
sliderID == 'epsilon_cutoff_textgenerationwebui') {
|
||||||
numSteps = 50;
|
numSteps = 50;
|
||||||
|
@ -80,6 +80,7 @@ const OOBA_DEFAULT_ORDER = [
|
|||||||
'top_a',
|
'top_a',
|
||||||
'min_p',
|
'min_p',
|
||||||
'mirostat',
|
'mirostat',
|
||||||
|
"xtc"
|
||||||
];
|
];
|
||||||
const BIAS_KEY = '#textgenerationwebui_api-settings';
|
const BIAS_KEY = '#textgenerationwebui_api-settings';
|
||||||
|
|
||||||
@ -188,6 +189,8 @@ const settings = {
|
|||||||
custom_model: '',
|
custom_model: '',
|
||||||
bypass_status_check: false,
|
bypass_status_check: false,
|
||||||
openrouter_allow_fallbacks: true,
|
openrouter_allow_fallbacks: true,
|
||||||
|
xtc_threshold: 0.1,
|
||||||
|
xtc_probability: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
export let textgenerationwebui_banned_in_macros = [];
|
export let textgenerationwebui_banned_in_macros = [];
|
||||||
@ -263,6 +266,8 @@ export const setting_names = [
|
|||||||
'custom_model',
|
'custom_model',
|
||||||
'bypass_status_check',
|
'bypass_status_check',
|
||||||
'openrouter_allow_fallbacks',
|
'openrouter_allow_fallbacks',
|
||||||
|
'xtc_threshold',
|
||||||
|
'xtc_probability',
|
||||||
];
|
];
|
||||||
|
|
||||||
const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba');
|
const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba');
|
||||||
@ -718,6 +723,8 @@ jQuery(function () {
|
|||||||
'dry_multiplier_textgenerationwebui': 0,
|
'dry_multiplier_textgenerationwebui': 0,
|
||||||
'dry_base_textgenerationwebui': 1.75,
|
'dry_base_textgenerationwebui': 1.75,
|
||||||
'dry_penalty_last_n_textgenerationwebui': 0,
|
'dry_penalty_last_n_textgenerationwebui': 0,
|
||||||
|
'xtc_threshold_textgenerationwebui': 0.1,
|
||||||
|
'xtc_probability_textgenerationwebui': 0
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const [id, value] of Object.entries(inputs)) {
|
for (const [id, value] of Object.entries(inputs)) {
|
||||||
@ -1128,6 +1135,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
|||||||
'api_server': getTextGenServer(),
|
'api_server': getTextGenServer(),
|
||||||
'legacy_api': settings.legacy_api && (settings.type === OOBA || settings.type === APHRODITE),
|
'legacy_api': settings.legacy_api && (settings.type === OOBA || settings.type === APHRODITE),
|
||||||
'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined,
|
'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined,
|
||||||
|
'xtc_threshold': settings.type === OOBA ? settings.xtc_threshold : undefined,
|
||||||
|
'xtc_probability': settings.type === OOBA ? settings.xtc_probability : undefined,
|
||||||
};
|
};
|
||||||
const nonAphroditeParams = {
|
const nonAphroditeParams = {
|
||||||
'rep_pen': settings.rep_pen,
|
'rep_pen': settings.rep_pen,
|
||||||
|
Reference in New Issue
Block a user