DreamGen Lucid
| @@ -1416,7 +1416,7 @@ | |||
| 1416 | </div> | 1416 | </div> |
| 1417 | </div> | 1417 | </div> |
| 1418 | 1418 | ||
| 1419 | <div data-tg-type="aphrodite, ooba, koboldcpp, tabby, llamacpp" id="dryBlock" class="wide100p"> | 1419 | <div data-tg-type="aphrodite, ooba, koboldcpp, tabby, llamacpp, dreamgen" id="dryBlock" class="wide100p"> |
| 1420 | <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"> | 1420 | <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"> |
| 1421 | <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label> | 1421 | <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label> |
| 1422 | <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank"> | 1422 | <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank"> |
| @@ -1571,7 +1571,7 @@ | |||
| 1571 | <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> | 1571 | <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> |
| 1572 | </label> | 1572 | </label> |
| 1573 | </label> | 1573 | </label> |
| 1574 | <label data-tg-type="ooba, llamacpp, tabby, koboldcpp" class="checkbox_label flexGrow flexShrink" for="ban_eos_token_textgenerationwebui"> | 1574 | <label data-tg-type="ooba, llamacpp, tabby, koboldcpp, dreamgen" class="checkbox_label flexGrow flexShrink" for="ban_eos_token_textgenerationwebui"> |
| 1575 | <input type="checkbox" id="ban_eos_token_textgenerationwebui" /> | 1575 | <input type="checkbox" id="ban_eos_token_textgenerationwebui" /> |
| 1576 | <label> | 1576 | <label> |
| 1577 | <small data-i18n="Ban EOS Token">Ban EOS Token</small> | 1577 | <small data-i18n="Ban EOS Token">Ban EOS Token</small> |
| @@ -923,6 +923,10 @@ export function getCurrentDreamGenModelTokenizer() { | |||
| 923 | return tokenizers.YI; | 923 | return tokenizers.YI; |
| 924 | } else if (model.id.startsWith('opus-v1-xl')) { | 924 | } else if (model.id.startsWith('opus-v1-xl')) { |
| 925 | return tokenizers.LLAMA; | 925 | return tokenizers.LLAMA; |
| 926 | } else if (model.id.startsWith('lucid-v1-medium')) { | ||
| 927 | return tokenizers.NEMO; | ||
| 928 | } else if (model.id.startsWith('lucid-v1-extra-large')) { | ||
| 929 | return tokenizers.LLAMA3; | ||
| 926 | } else { | 930 | } else { |
| 927 | return tokenizers.MISTRAL; | 931 | return tokenizers.MISTRAL; |
| 928 | } | 932 | } |
| @@ -268,23 +268,6 @@ export const FEATHERLESS_KEYS = [ | |||
| 268 | 'guided_whitespace_pattern', | 268 | 'guided_whitespace_pattern', |
| 269 | ]; | 269 | ]; |
| 270 | 270 | ||
| 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 | |||
| 288 | // https://docs.together.ai/reference/completions | 271 | // https://docs.together.ai/reference/completions |
| 289 | export const TOGETHERAI_KEYS = [ | 272 | export const TOGETHERAI_KEYS = [ |
| 290 | 'model', | 273 | 'model', |
| @@ -340,9 +340,6 @@ router.post('/generate', async function (request, response) { | |||
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | if (request.body.api_type === TEXTGEN_TYPES.DREAMGEN) { | 342 | 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'); | ||
| 346 | args.body = JSON.stringify(request.body); | 343 | args.body = JSON.stringify(request.body); |
| 347 | } | 344 | } |
| 348 | 345 | ||