Merge pull request #3881 from DreamGenX/dg_lucid DreamGen Lucid

7f22def7943d36f74715f2ba6b5cdf887fbe50a7

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
4 files changed, +6 -23Showing whitespace changes
public/index.html+2 -2
@@ -1419,7 +1419,7 @@
14191419 </div>
14201420 </div>
14211421
14221422 <div data-tg-type="aphrodite, ooba, koboldcpp, tabby, llamacpp, dreamgen" id="dryBlock" class="wide100p">
14231423 <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">
14241424 <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label>
14251425 <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank">
@@ -1574,7 +1574,7 @@
15741574 <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>
15751575 </label>
15761576 </label>
15771577 <label data-tg-type="ooba, llamacpp, tabby, koboldcpp, dreamgen" class="checkbox_label flexGrow flexShrink" for="ban_eos_token_textgenerationwebui">
15781578 <input type="checkbox" id="ban_eos_token_textgenerationwebui" />
15791579 <label>
15801580 <small data-i18n="Ban EOS Token">Ban EOS Token</small>
public/scripts/textgen-models.js+4 -0
@@ -928,6 +928,10 @@ export function getCurrentDreamGenModelTokenizer() {
928928 return tokenizers.YI;
929929 } else if (model.id.startsWith('opus-v1-xl')) {
930930 return tokenizers.LLAMA;
931+ } else if (model.id.startsWith('lucid-v1-medium')) {
932+ return tokenizers.NEMO;
933+ } else if (model.id.startsWith('lucid-v1-extra-large')) {
934+ return tokenizers.LLAMA3;
931935 } else {
932936 return tokenizers.MISTRAL;
933937 }
src/constants.js+0 -17
@@ -268,23 +268,6 @@ export const FEATHERLESS_KEYS = [
268268 'guided_whitespace_pattern',
269269];
270270
271-// https://dreamgen.com/docs/api#openai-text
272-export const DREAMGEN_KEYS = [
273- 'model',
274- 'prompt',
275- 'max_tokens',
276- 'temperature',
277- 'top_p',
278- 'top_k',
279- 'min_p',
280- 'repetition_penalty',
281- 'frequency_penalty',
282- 'presence_penalty',
283- 'stop',
284- 'stream',
285- 'minimum_message_content_tokens',
286-];
287-
288271// https://docs.together.ai/reference/completions
289272export const TOGETHERAI_KEYS = [
290273 'model',
src/endpoints/backends/text-completions.js+0 -4
@@ -10,7 +10,6 @@ import {
1010 INFERMATICAI_KEYS,
1111 OPENROUTER_KEYS,
1212 VLLM_KEYS,
13- DREAMGEN_KEYS,
1413 FEATHERLESS_KEYS,
1514 OPENAI_KEYS,
1615} from '../../constants.js';
@@ -340,9 +339,6 @@ router.post('/generate', async function (request, response) {
340339 }
341340
342341 if (request.body.api_type === TEXTGEN_TYPES.DREAMGEN) {
343- request.body = _.pickBy(request.body, (_, key) => DREAMGEN_KEYS.includes(key));
344- // NOTE: DreamGen sometimes get confused by the unusual formatting in the character cards.
345- request.body.stop?.push('### User', '## User');
346342 args.body = JSON.stringify(request.body);
347343 }
348344