Implement suggestions

This commit is contained in:
DreamGenX 2024-03-07 17:28:38 +01:00
parent 5c410986a4
commit bc8d41b530
3 changed files with 4 additions and 11 deletions

View File

@ -1271,16 +1271,11 @@
<input class="neo-range-slider" type="range" id="no_repeat_ngram_size_textgenerationwebui" name="volume" min="0" max="20" step="1">
<input class="neo-range-input" type="number" min="0" max="20" step="1" data-for="no_repeat_ngram_size_textgenerationwebui" id="no_repeat_ngram_size_counter_textgenerationwebui">
</div>
<div data-newbie-hidden data-tg-type="ooba" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
<div data-newbie-hidden data-tg-type="ooba, dreamgen" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
<small data-i18n="Min Length">Min Length</small>
<input class="neo-range-slider" type="range" id="min_length_textgenerationwebui" name="volume" min="0" max="2000" step="1" />
<input class="neo-range-input" type="number" min="0" max="2000" step="1" data-for="min_length_textgenerationwebui" id="min_length_counter_textgenerationwebui">
</div>
<div data-newbie-hidden data-tg-type="dreamgen" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
<small data-i18n="Min Message Length">Min Message Length</small>
<input class="neo-range-slider" type="range" id="minimum_message_content_tokens_textgenerationwebui" name="volume" min="0" max="150" step="1" />
<input class="neo-range-input" type="number" min="0" max="150" step="1" data-for="minimum_message_content_tokens_textgenerationwebui" id="minimum_message_content_tokens_counter_textgenerationwebui">
</div>
<div data-newbie-hidden data-tg-type="ooba, koboldcpp, aphrodite, tabby" class="alignitemscenter flex-container flexFlowColumn flexBasis48p 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="10" step="0.01" />

View File

@ -376,8 +376,8 @@ export function getCurrentOpenRouterModelTokenizer() {
}
export function getCurrentDreamGenModelTokenizer() {
const modelId = textgen_settings.openrouter_model;
const model = openRouterModels.find(x => x.id === modelId);
const modelId = textgen_settings.dreamgen_model;
const model = dreamGenModels.find(x => x.id === modelId);
if (model.id.startsWith('opus-v1-sm')) {
return tokenizers.MISTRAL;
} else if (model.id.startsWith('opus-v1-lg')) {

View File

@ -103,7 +103,6 @@ const settings = {
num_beams: 1,
length_penalty: 1,
min_length: 0,
minimum_message_content_tokens: 0,
encoder_rep_pen: 1,
freq_pen: 0,
presence_pen: 0,
@ -179,7 +178,6 @@ const setting_names = [
'num_beams',
'length_penalty',
'min_length',
'minimum_message_content_tokens',
'dynatemp',
'min_temp',
'max_temp',
@ -990,7 +988,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'presence_penalty': settings.presence_pen,
'top_k': settings.top_k,
'min_length': settings.type === OOBA ? settings.min_length : undefined,
'minimum_message_content_tokens': settings.type === DREAMGEN ? settings.minimum_message_content_tokens : undefined,
'minimum_message_content_tokens': settings.type === DREAMGEN ? settings.min_length : undefined,
'min_tokens': settings.min_length,
'num_beams': settings.type === OOBA ? settings.num_beams : undefined,
'length_penalty': settings.length_penalty,