added xtc parameter for ooba

This commit is contained in:
Vitor
2024-08-19 01:32:45 -03:00
parent e707def7dd
commit e28257096a
3 changed files with 45 additions and 0 deletions

View File

@@ -80,6 +80,7 @@ const OOBA_DEFAULT_ORDER = [
'top_a',
'min_p',
'mirostat',
"xtc"
];
const BIAS_KEY = '#textgenerationwebui_api-settings';
@@ -188,6 +189,8 @@ const settings = {
custom_model: '',
bypass_status_check: false,
openrouter_allow_fallbacks: true,
xtc_threshold: 0.1,
xtc_probability: 0,
};
export let textgenerationwebui_banned_in_macros = [];
@@ -263,6 +266,8 @@ export const setting_names = [
'custom_model',
'bypass_status_check',
'openrouter_allow_fallbacks',
'xtc_threshold',
'xtc_probability',
];
const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba');
@@ -718,6 +723,8 @@ jQuery(function () {
'dry_multiplier_textgenerationwebui': 0,
'dry_base_textgenerationwebui': 1.75,
'dry_penalty_last_n_textgenerationwebui': 0,
'xtc_threshold_textgenerationwebui': 0.1,
'xtc_probability_textgenerationwebui': 0
};
for (const [id, value] of Object.entries(inputs)) {
@@ -1128,6 +1135,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'api_server': getTextGenServer(),
'legacy_api': settings.legacy_api && (settings.type === OOBA || settings.type === APHRODITE),
'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 = {
'rep_pen': settings.rep_pen,