mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
@ -1419,7 +1419,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-tg-type="aphrodite, ooba, koboldcpp, tabby, llamacpp" id="dryBlock" class="wide100p">
|
<div data-tg-type="aphrodite, ooba, koboldcpp, tabby, llamacpp, dreamgen" 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">
|
||||||
<label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label>
|
<label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label>
|
||||||
<a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank">
|
<a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank">
|
||||||
@ -1574,7 +1574,7 @@
|
|||||||
<div class="fa-solid fa-circle-info opacity50p " data-i18n="[title]Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative" title="Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative."></div>
|
<div class="fa-solid fa-circle-info opacity50p " data-i18n="[title]Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative" title="Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative."></div>
|
||||||
</label>
|
</label>
|
||||||
</label>
|
</label>
|
||||||
<label data-tg-type="ooba, llamacpp, tabby, koboldcpp" class="checkbox_label flexGrow flexShrink" for="ban_eos_token_textgenerationwebui">
|
<label data-tg-type="ooba, llamacpp, tabby, koboldcpp, dreamgen" class="checkbox_label flexGrow flexShrink" for="ban_eos_token_textgenerationwebui">
|
||||||
<input type="checkbox" id="ban_eos_token_textgenerationwebui" />
|
<input type="checkbox" id="ban_eos_token_textgenerationwebui" />
|
||||||
<label>
|
<label>
|
||||||
<small data-i18n="Ban EOS Token">Ban EOS Token</small>
|
<small data-i18n="Ban EOS Token">Ban EOS Token</small>
|
||||||
|
@ -928,6 +928,10 @@ export function getCurrentDreamGenModelTokenizer() {
|
|||||||
return tokenizers.YI;
|
return tokenizers.YI;
|
||||||
} else if (model.id.startsWith('opus-v1-xl')) {
|
} else if (model.id.startsWith('opus-v1-xl')) {
|
||||||
return tokenizers.LLAMA;
|
return tokenizers.LLAMA;
|
||||||
|
} else if (model.id.startsWith('lucid-v1-medium')) {
|
||||||
|
return tokenizers.NEMO;
|
||||||
|
} else if (model.id.startsWith('lucid-v1-extra-large')) {
|
||||||
|
return tokenizers.LLAMA3;
|
||||||
} else {
|
} else {
|
||||||
return tokenizers.MISTRAL;
|
return tokenizers.MISTRAL;
|
||||||
}
|
}
|
||||||
|
@ -268,23 +268,6 @@ export const FEATHERLESS_KEYS = [
|
|||||||
'guided_whitespace_pattern',
|
'guided_whitespace_pattern',
|
||||||
];
|
];
|
||||||
|
|
||||||
// https://dreamgen.com/docs/api#openai-text
|
|
||||||
export const DREAMGEN_KEYS = [
|
|
||||||
'model',
|
|
||||||
'prompt',
|
|
||||||
'max_tokens',
|
|
||||||
'temperature',
|
|
||||||
'top_p',
|
|
||||||
'top_k',
|
|
||||||
'min_p',
|
|
||||||
'repetition_penalty',
|
|
||||||
'frequency_penalty',
|
|
||||||
'presence_penalty',
|
|
||||||
'stop',
|
|
||||||
'stream',
|
|
||||||
'minimum_message_content_tokens',
|
|
||||||
];
|
|
||||||
|
|
||||||
// https://docs.together.ai/reference/completions
|
// https://docs.together.ai/reference/completions
|
||||||
export const TOGETHERAI_KEYS = [
|
export const TOGETHERAI_KEYS = [
|
||||||
'model',
|
'model',
|
||||||
|
@ -10,7 +10,6 @@ import {
|
|||||||
INFERMATICAI_KEYS,
|
INFERMATICAI_KEYS,
|
||||||
OPENROUTER_KEYS,
|
OPENROUTER_KEYS,
|
||||||
VLLM_KEYS,
|
VLLM_KEYS,
|
||||||
DREAMGEN_KEYS,
|
|
||||||
FEATHERLESS_KEYS,
|
FEATHERLESS_KEYS,
|
||||||
OPENAI_KEYS,
|
OPENAI_KEYS,
|
||||||
} from '../../constants.js';
|
} from '../../constants.js';
|
||||||
@ -340,9 +339,6 @@ router.post('/generate', async function (request, response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (request.body.api_type === TEXTGEN_TYPES.DREAMGEN) {
|
if (request.body.api_type === TEXTGEN_TYPES.DREAMGEN) {
|
||||||
request.body = _.pickBy(request.body, (_, key) => DREAMGEN_KEYS.includes(key));
|
|
||||||
// NOTE: DreamGen sometimes get confused by the unusual formatting in the character cards.
|
|
||||||
request.body.stop?.push('### User', '## User');
|
|
||||||
args.body = JSON.stringify(request.body);
|
args.body = JSON.stringify(request.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user