DreamGen Lucid

This commit is contained in:
DreamGenX
2025-04-19 15:04:00 +02:00
parent ef56eda2c2
commit dc6407ee8f
4 changed files with 6 additions and 22 deletions

View File

@ -1416,7 +1416,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">
@ -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> <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>

View File

@ -923,6 +923,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;
} }

View File

@ -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',

View File

@ -340,9 +340,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);
} }