mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
DreamGen Lucid
This commit is contained in:
@ -1416,7 +1416,7 @@
|
||||
</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">
|
||||
<label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label>
|
||||
<a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank">
|
||||
@ -1571,7 +1571,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>
|
||||
</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" />
|
||||
<label>
|
||||
<small data-i18n="Ban EOS Token">Ban EOS Token</small>
|
||||
|
@ -923,6 +923,10 @@ export function getCurrentDreamGenModelTokenizer() {
|
||||
return tokenizers.YI;
|
||||
} else if (model.id.startsWith('opus-v1-xl')) {
|
||||
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 {
|
||||
return tokenizers.MISTRAL;
|
||||
}
|
||||
|
@ -268,23 +268,6 @@ export const FEATHERLESS_KEYS = [
|
||||
'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
|
||||
export const TOGETHERAI_KEYS = [
|
||||
'model',
|
||||
|
@ -340,9 +340,6 @@ router.post('/generate', async function (request, response) {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user