mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 11:35:37 +01:00
Update DynaTemp Sliders
More inline with changes made that will be implemented in KCPP main.
This commit is contained in:
parent
d66be24518
commit
224dcc83a1
@ -1317,24 +1317,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div data-newbie-hidden name="dynaTempBlock" class="wide100p">
|
<div data-newbie-hidden name="dynaTempBlock" class="wide100p">
|
||||||
<h4 class="wide100p textAlignCenter" data-i18n="DynaTemp">DynaTemp
|
<h4 class="wide100p textAlignCenter" data-i18n="DynaTemp">DynaTemp
|
||||||
<div class=" fa-solid fa-circle-info opacity50p " title="Helpful tip coming soon."></div>
|
<div class=" fa-solid fa-circle-info opacity50p " title="Set range to 0 to Deactivate."></div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="flex-container flexFlowRow alignitemscenter gap10px flexShrink">
|
<div class="flex-container flexFlowRow alignitemscenter gap10px flexShrink">
|
||||||
<div class="">
|
|
||||||
<label class="checkbox_label" for="dynatemp_textgenerationwebui">
|
|
||||||
<input type="checkbox" id="dynatemp_textgenerationwebui" />
|
|
||||||
<small data-i18n="dynatemp">Activate</small>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">
|
<div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">
|
||||||
<small data-i18n="Min Temp">Min Temp</small>
|
<small data-i18n="DynaTemp Range">DynaTemp Range</small>
|
||||||
<input class="neo-range-slider" type="range" id="min_temp_textgenerationwebui" name="volume" min="0" max="5" step="0.1" />
|
<input class="neo-range-slider" type="range" id="dynatemp_range_textgenerationwebui" name="volume" min="0" max="2.0" step="0.1" />
|
||||||
<input class="neo-range-input" type="number" min="0" max="5" step="0.1" data-for="min_temp_textgenerationwebui" id="min_temp_counter_textgenerationwebui">
|
<input class="neo-range-input" type="number" min="0" max="2.0" step="0.1" data-for="dynatemp_range_textgenerationwebui" id="dynatemp_range_counter_textgenerationwebui">
|
||||||
</div>
|
|
||||||
<div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">
|
|
||||||
<small data-i18n="Max Temp">Max Temp</small>
|
|
||||||
<input class="neo-range-slider" type="range" id="max_temp_textgenerationwebui" name="volume" min="0" max="5" step="0.1" />
|
|
||||||
<input class="neo-range-input" type="number" min="0" max="5" step="0.1" data-for="max_temp_textgenerationwebui" id="max_temp_counter_textgenerationwebui">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,9 +31,7 @@ export const kai_settings = {
|
|||||||
use_default_badwordsids: false,
|
use_default_badwordsids: false,
|
||||||
grammar: '',
|
grammar: '',
|
||||||
seed: -1,
|
seed: -1,
|
||||||
dynatemp: false,
|
dynatemp_range: 0,
|
||||||
min_temp: 0.1,
|
|
||||||
max_temp: 2.0,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -143,9 +141,7 @@ export function getKoboldGenerationData(finalPrompt, settings, maxLength, maxCon
|
|||||||
use_default_badwordsids: (kai_flags.can_use_default_badwordsids || isHorde) ? kai_settings.use_default_badwordsids : undefined,
|
use_default_badwordsids: (kai_flags.can_use_default_badwordsids || isHorde) ? kai_settings.use_default_badwordsids : undefined,
|
||||||
grammar: (kai_flags.can_use_grammar || isHorde) ? substituteParams(kai_settings.grammar) : undefined,
|
grammar: (kai_flags.can_use_grammar || isHorde) ? substituteParams(kai_settings.grammar) : undefined,
|
||||||
sampler_seed: kai_settings.seed >= 0 ? kai_settings.seed : undefined,
|
sampler_seed: kai_settings.seed >= 0 ? kai_settings.seed : undefined,
|
||||||
dynatemp: (kai_flags.can_use_dynatemp || isHorde) ? kai_settings.dynatemp : false,
|
dynatemp_range: (kai_flags.can_use_dynatemp || isHorde) ? kai_settings.dynatemp_range : undefined,
|
||||||
min_temp: (kai_flags.can_use_dynatemp || isHorde) ? kai_settings.min_temp : undefined,
|
|
||||||
max_temp: (kai_flags.can_use_dynatemp || isHorde) ? kai_settings.max_temp : undefined,
|
|
||||||
api_server,
|
api_server,
|
||||||
};
|
};
|
||||||
return generate_data;
|
return generate_data;
|
||||||
@ -313,19 +309,12 @@ const sliders = [
|
|||||||
setValue: (val) => { kai_settings.seed = Number(val); },
|
setValue: (val) => { kai_settings.seed = Number(val); },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'min_temp',
|
name: 'dynatemp_range',
|
||||||
sliderId: '#min_temp_kobold',
|
sliderId: '#dynatemp_range_kobold',
|
||||||
counterId: '#min_temp_counter_kobold',
|
counterId: '#dynatemp_range_counter_kobold',
|
||||||
format: (val) => val,
|
format: (val) => val,
|
||||||
setValue: (val) => { kai_settings.min_temp = Number(val); },
|
setValue: (val) => { kai_settings.min_temp = Number(val); },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'max_temp',
|
|
||||||
sliderId: '#max_temp_kobold',
|
|
||||||
counterId: '#max_temp_counter_kobold',
|
|
||||||
format: (val) => val,
|
|
||||||
setValue: (val) => { kai_settings.max_temp = Number(val); },
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export function setKoboldFlags(koboldUnitedVersion, koboldCppVersion) {
|
export function setKoboldFlags(koboldUnitedVersion, koboldCppVersion) {
|
||||||
|
@ -604,8 +604,7 @@ async function CreateZenSliders(elmnt) {
|
|||||||
sliderID == 'rep_pen_range') {
|
sliderID == 'rep_pen_range') {
|
||||||
decimals = 0;
|
decimals = 0;
|
||||||
}
|
}
|
||||||
if (sliderID == 'min_temp_textgenerationwebui' ||
|
if (sliderID == 'dynatemp_range_textgenerationwebui') {
|
||||||
sliderID == 'max_temp_textgenerationwebui') {
|
|
||||||
decimals = 2;
|
decimals = 2;
|
||||||
}
|
}
|
||||||
if (sliderID == 'eta_cutoff_textgenerationwebui' ||
|
if (sliderID == 'eta_cutoff_textgenerationwebui' ||
|
||||||
@ -632,14 +631,13 @@ async function CreateZenSliders(elmnt) {
|
|||||||
sliderID == 'tfs_textgenerationwebui' ||
|
sliderID == 'tfs_textgenerationwebui' ||
|
||||||
sliderID == 'min_p_textgenerationwebui' ||
|
sliderID == 'min_p_textgenerationwebui' ||
|
||||||
sliderID == 'temp_textgenerationwebui' ||
|
sliderID == 'temp_textgenerationwebui' ||
|
||||||
sliderID == 'temp') {
|
sliderID == 'temp' ||
|
||||||
|
sliderID == 'dynatemp_range_textgenerationwebui') {
|
||||||
numSteps = 20;
|
numSteps = 20;
|
||||||
}
|
}
|
||||||
if (sliderID == 'mirostat_eta_textgenerationwebui' ||
|
if (sliderID == 'mirostat_eta_textgenerationwebui' ||
|
||||||
sliderID == 'penalty_alpha_textgenerationwebui' ||
|
sliderID == 'penalty_alpha_textgenerationwebui' ||
|
||||||
sliderID == 'length_penalty_textgenerationwebui' ||
|
sliderID == 'length_penalty_textgenerationwebui') {
|
||||||
sliderID == 'min_temp_textgenerationwebui' ||
|
|
||||||
sliderID == 'max_temp_textgenerationwebui') {
|
|
||||||
numSteps = 50;
|
numSteps = 50;
|
||||||
}
|
}
|
||||||
//customize off values
|
//customize off values
|
||||||
|
@ -79,9 +79,7 @@ const settings = {
|
|||||||
presence_pen: 0,
|
presence_pen: 0,
|
||||||
do_sample: true,
|
do_sample: true,
|
||||||
early_stopping: false,
|
early_stopping: false,
|
||||||
dynatemp: false,
|
dynatemp_range: 0,
|
||||||
min_temp: 0,
|
|
||||||
max_temp: 2.0,
|
|
||||||
seed: -1,
|
seed: -1,
|
||||||
preset: 'Default',
|
preset: 'Default',
|
||||||
add_bos_token: true,
|
add_bos_token: true,
|
||||||
@ -138,9 +136,7 @@ const setting_names = [
|
|||||||
'num_beams',
|
'num_beams',
|
||||||
'length_penalty',
|
'length_penalty',
|
||||||
'min_length',
|
'min_length',
|
||||||
'dynatemp',
|
'dynatemp_range',
|
||||||
'min_temp',
|
|
||||||
'max_temp',
|
|
||||||
'encoder_rep_pen',
|
'encoder_rep_pen',
|
||||||
'freq_pen',
|
'freq_pen',
|
||||||
'presence_pen',
|
'presence_pen',
|
||||||
@ -704,9 +700,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
|||||||
'length_penalty': settings.length_penalty,
|
'length_penalty': settings.length_penalty,
|
||||||
'early_stopping': settings.early_stopping,
|
'early_stopping': settings.early_stopping,
|
||||||
'add_bos_token': settings.add_bos_token,
|
'add_bos_token': settings.add_bos_token,
|
||||||
'dynatemp': settings.dynatemp,
|
'dynatemp_range': settings.dynatemp_range,
|
||||||
'min_temp': settings.min_temp,
|
|
||||||
'max_temp': settings.max_temp,
|
|
||||||
'stopping_strings': getStoppingStrings(isImpersonate, isContinue),
|
'stopping_strings': getStoppingStrings(isImpersonate, isContinue),
|
||||||
'stop': getStoppingStrings(isImpersonate, isContinue),
|
'stop': getStoppingStrings(isImpersonate, isContinue),
|
||||||
'truncation_length': max_context,
|
'truncation_length': max_context,
|
||||||
|
8
src/ai_horde/index.d.ts
vendored
8
src/ai_horde/index.d.ts
vendored
@ -901,12 +901,8 @@ export interface ModelGenerationInputKobold {
|
|||||||
min_p?: number;
|
min_p?: number;
|
||||||
/** Typical sampling value. */
|
/** Typical sampling value. */
|
||||||
typical?: number;
|
typical?: number;
|
||||||
/** DynaTemp sampling activataion. */
|
/** DynaTemp sampling range value. */
|
||||||
dynatemp?: boolean;
|
dynatemp_range?: number;
|
||||||
/** DynaTemp minimum temperature value. */
|
|
||||||
min_temp?: number;
|
|
||||||
/** DynaTemp maximum temperature value. */
|
|
||||||
max_temp?: number;
|
|
||||||
/** Array of integers representing the sampler order to be used */
|
/** Array of integers representing the sampler order to be used */
|
||||||
sample_order?: number[];
|
sample_order?: number[];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user