clean up
| @@ -215,7 +215,7 @@ | ||
| 215 | 215 | <label class="checkbox_label"> |
| 216 | 216 | <input id="max_context_unlocked" type="checkbox" /> |
| 217 | 217 | <small><span data-i18n="unlocked">Unlocked</span> |
| 218 | 218 | <div id="max_context_unlocked_warning" class="fa-solid fa-circle-info opacity50p " data-i18n="[title]Only enable this if your model supports context sizes greater than 40968192 tokens" title="Only enable this if your model supports context sizes greater than 4096 tokens. Increase only if you know what you're doing."></div> |
| 219 | 219 | </small> |
| 220 | 220 | </label> |
| 221 | 221 | </div> |
| @@ -1396,28 +1396,36 @@ | ||
| 1396 | 1396 | </div> |
| 1397 | 1397 | </div> |
| 1398 | 1398 | </div> |
| 1399 | 1399 | <div data-tg-type="ooba, vllm, aphrodite" id="beamSearchBlock" name="beamSearchBlock" class="wide100p"> |
| 1400 | 1400 | <h4 class="wide100p textAlignCenter"> |
| 1401 | 1401 | <label> |
| 1402 | 1402 | <span data-i18n="Beam search">Beam Search</span> |
| 1403 | - <div class=" fa-solid fa-circle-info opacity50p " title="Helpful tip coming soon." data-i18n="[title]Helpful tip coming soon."></div> | |
| 1403 | + <div class=" fa-solid fa-circle-info opacity50p " title="A greedy, brute-force algorithm used in LLM sampling to find the most likely sequence of words or tokens. It expands multiple candidate sequences at once, maintaining a fixed number (beam width) of top sequences at each step." data-i18n="[title]A greedy, brute-force algorithm used in LLM sampling to find the most likely sequence of words or tokens. It expands multiple candidate sequences at once, maintaining a fixed number (beam width) of top sequences at each step."></div> | |
| 1404 | 1404 | </label> |
| 1405 | 1405 | </h4> |
| 1406 | 1406 | <div class="flex-container flexFlowRow alignitemscenter gap10px flexShrink"> |
| 1407 | 1407 | <div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0"> |
| 1408 | - <small data-i18n="Number of Beams"># of Beams</small> | |
| 1408 | + <label> | |
| 1409 | + <small data-i18n="# of Beams"># of Beams</small> | |
| 1410 | + <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]The number of sequences generated at each step with Beam Search." title="The number of sequences generated at each step with Beam Search."></div> | |
| 1411 | + </label> | |
| 1409 | 1412 | <input class="neo-range-slider" type="range" id="num_beams_textgenerationwebui" name="volume" min="1" max="20" step="1" /> |
| 1410 | 1413 | <input class="neo-range-input" type="number" min="1" max="20" step="1" data-for="num_beams_textgenerationwebui" id="num_beams_counter_textgenerationwebui"> |
| 1411 | 1414 | </div> |
| 1412 | 1415 | <div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0"> |
| 1413 | - <small data-i18n="Length Penalty">Length Penalty</small> | |
| 1416 | + <label> | |
| 1417 | + <small data-i18n="Length Penalty">Length Penalty</small> | |
| 1418 | + <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Penalize sequences based on their length." title="Penalize sequences based on their length."></div> | |
| 1419 | + </label> | |
| 1414 | 1420 | <input class="neo-range-slider" type="range" id="length_penalty_textgenerationwebui" name="volume" min="-5" max="5" step="0.1" /> |
| 1415 | 1421 | <input class="neo-range-input" type="number" min="-5" max="5" step="0.1" data-for="length_penalty_textgenerationwebui" id="length_penalty_counter_textgenerationwebui"> |
| 1416 | 1422 | </div> |
| 1417 | 1423 | <div class=""> |
| 1418 | 1424 | <label class="checkbox_label" for="early_stopping_textgenerationwebui"> |
| 1419 | 1425 | <input type="checkbox" id="early_stopping_textgenerationwebui" checked="false" /> |
| 1420 | 1426 | <small data-i18n="Early Stopping">Early Stopping</small> |
| 1427 | + <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Controls the stopping condition for beam search. If checked, the generation stops as soon as there are '# of Beams' sequences. If not checked, a heuristic is applied and the generation is stopped when it's very unlikely to find better candidates." title="Controls the stopping condition for beam search. If checked, the generation stops as soon as there are '# of Beams' sequences. If not checked, a heuristic is applied and the generation is stopped when it's very unlikely to find better candidates."></div> | |
| 1428 | + </small> | |
| 1421 | 1429 | </label> |
| 1422 | 1430 | </div> |
| 1423 | 1431 | </div> |
| @@ -1487,7 +1495,10 @@ | ||
| 1487 | 1495 | </div> |
| 1488 | 1496 | </div> |
| 1489 | 1497 | <div data-tg-type="mancer, ooba, koboldcpp, vllm, aphrodite, llamacpp, ollama, infermaticai, huggingface" class="flex-container flexFlowColumn alignitemscenter flexBasis48p flexGrow flexShrink gap0"> |
| 1490 | - <small data-i18n="Seed" class="textAlignCenter">Seed</small> | |
| 1498 | + <label> | |
| 1499 | + <small data-i18n="Seed">Seed</small> | |
| 1500 | + <div class="fa-solid fa-circle-info opacity50p " data-i18n="[title]Seed_desc" title="A random seed to use for deterministic and reproducable outputs. Set to -1 to use a random seed."></div> | |
| 1501 | + </label> | |
| 1491 | 1502 | <input type="number" id="seed_textgenerationwebui" class="text_pole textAlignCenter" min="-1" value="-1" /> |
| 1492 | 1503 | </div> |
| 1493 | 1504 | <div id="banned_tokens_block_ooba" class="wide100p"> |
| @@ -188,7 +188,6 @@ const settings = { | ||
| 188 | 188 | xtc_threshold: 0.1, |
| 189 | 189 | xtc_probability: 0, |
| 190 | 190 | include_stop_str_in_output: false, |
| 191 | - guided_regex: '', | |
| 192 | 191 | }; |
| 193 | 192 | |
| 194 | 193 | export let textgenerationwebui_banned_in_macros = []; |
| @@ -262,7 +261,6 @@ export const setting_names = [ | ||
| 262 | 261 | 'xtc_threshold', |
| 263 | 262 | 'xtc_probability', |
| 264 | 263 | 'include_stop_str_in_output', |
| 265 | - 'guided_regex', | |
| 266 | 264 | ]; |
| 267 | 265 | |
| 268 | 266 | const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba'); |
| @@ -1207,7 +1205,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, | ||
| 1207 | 1205 | 'presence_penalty': settings.presence_pen, |
| 1208 | 1206 | 'repetition_penalty': settings.rep_pen, |
| 1209 | 1207 | 'seed': settings.seed, |
| 1210 | 1208 | 'stop': settings.stopping_stringsgetStoppingStrings(isImpersonate, isContinue), |
| 1211 | 1209 | 'temperature': settings.temp, |
| 1212 | 1210 | 'temperature_last': settings.temperature_last, |
| 1213 | 1211 | 'top_p': settings.top_p, |
| @@ -1221,6 +1219,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, | ||
| 1221 | 1219 | 'smoothing_factor': settings.smoothing_factor, |
| 1222 | 1220 | 'smoothing_curve': settings.smoothing_curve, |
| 1223 | 1221 | 'use_beam_search': settings.use_beam_search, |
| 1222 | + 'best_of': settings.num_beams > 1 ? settings.num_beams : settings.n, | |
| 1224 | 1223 | 'length_penalty': settings.length_penalty, |
| 1225 | 1224 | 'early_stopping': settings.early_stopping, |
| 1226 | 1225 | 'ignore_eos': settings.ignore_eos_token, |
| @@ -1230,8 +1229,6 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, | ||
| 1230 | 1229 | 'spaces_between_special_tokens': settings.spaces_between_special_tokens, |
| 1231 | 1230 | 'guided_grammar': settings.grammar_string, |
| 1232 | 1231 | 'guided_json': settings.json_schema, |
| 1233 | - | |
| 1234 | - | |
| 1235 | 1232 | }; |
| 1236 | 1233 | |
| 1237 | 1234 | if (settings.type === OPENROUTER) { |
| @@ -1271,7 +1268,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, | ||
| 1271 | 1268 | break; |
| 1272 | 1269 | |
| 1273 | 1270 | case APHRODITE: |
| 1274 | - params = Object.assign(aphroditeParams); | |
| 1271 | + // set params to aphroditeParams | |
| 1272 | + params = Object.assign(params, aphroditeParams); | |
| 1275 | 1273 | break; |
| 1276 | 1274 | |
| 1277 | 1275 | default: |