clean up

9c94348491fd63662b643130c5f09123c5ee456c

AlpinDale <alpindale@gmail.com>

2 files changed, +22 -13Showing whitespace changes
public/index.html+18 -7
@@ -215,7 +215,7 @@
215 <label class="checkbox_label">215 <label class="checkbox_label">
216 <input id="max_context_unlocked" type="checkbox" />216 <input id="max_context_unlocked" type="checkbox" />
217 <small><span data-i18n="unlocked">Unlocked</span>217 <small><span data-i18n="unlocked">Unlocked</span>
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 4096 tokens" title="Only enable this if your model supports context sizes greater than 4096 tokens.&#13;Increase only if you know what you're doing."></div>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 8192 tokens" title="Only enable this if your model supports context sizes greater than 4096 tokens.&#13;Increase only if you know what you're doing."></div>
219 </small>219 </small>
220 </label>220 </label>
221 </div>221 </div>
@@ -1396,28 +1396,36 @@
1396 </div>1396 </div>
1397 </div>1397 </div>
1398 </div>1398 </div>
1399 <div data-tg-type="ooba, vllm, aphrodite" id="beamSearchBlock" name="beamSearchBlock" class="wide100p">1399 <div data-tg-type="ooba, vllm" id="beamSearchBlock" name="beamSearchBlock" class="wide100p">
1400 <h4 class="wide100p textAlignCenter">1400 <h4 class="wide100p textAlignCenter">
1401 <label>1401 <label>
1402 <span data-i18n="Beam search">Beam Search</span>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 </label>1404 </label>
1405 </h4>1405 </h4>
1406 <div class="flex-container flexFlowRow alignitemscenter gap10px flexShrink">1406 <div class="flex-container flexFlowRow alignitemscenter gap10px flexShrink">
1407 <div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">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 <input class="neo-range-slider" type="range" id="num_beams_textgenerationwebui" name="volume" min="1" max="20" step="1" />1412 <input class="neo-range-slider" type="range" id="num_beams_textgenerationwebui" name="volume" min="1" max="20" step="1" />
1410 <input class="neo-range-input" type="number" min="1" max="20" step="1" data-for="num_beams_textgenerationwebui" id="num_beams_counter_textgenerationwebui">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 </div>1414 </div>
1412 <div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">1415 <div class="alignitemscenter flex-container marginBot5 flexFlowColumn flexGrow flexShrink gap0">
1416 <label>
1413 <small data-i18n="Length Penalty">Length Penalty</small>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 <input class="neo-range-slider" type="range" id="length_penalty_textgenerationwebui" name="volume" min="-5" max="5" step="0.1" />1420 <input class="neo-range-slider" type="range" id="length_penalty_textgenerationwebui" name="volume" min="-5" max="5" step="0.1" />
1415 <input class="neo-range-input" type="number" min="-5" max="5" step="0.1" data-for="length_penalty_textgenerationwebui" id="length_penalty_counter_textgenerationwebui">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 </div>1422 </div>
1417 <div class="">1423 <div class="">
1418 <label class="checkbox_label" for="early_stopping_textgenerationwebui">1424 <label class="checkbox_label" for="early_stopping_textgenerationwebui">
1419 <input type="checkbox" id="early_stopping_textgenerationwebui" />1425 <input type="checkbox" id="early_stopping_textgenerationwebui" checked="false" />
1420 <small data-i18n="Early Stopping">Early Stopping</small>1426 <small data-i18n="Early Stopping">Early Stopping
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 </label>1429 </label>
1422 </div>1430 </div>
1423 </div>1431 </div>
@@ -1487,7 +1495,10 @@
1487 </div>1495 </div>
1488 </div>1496 </div>
1489 <div data-tg-type="mancer, ooba, koboldcpp, vllm, aphrodite, llamacpp, ollama, infermaticai, huggingface" class="flex-container flexFlowColumn alignitemscenter flexBasis48p flexGrow flexShrink gap0">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 <input type="number" id="seed_textgenerationwebui" class="text_pole textAlignCenter" min="-1" value="-1" />1502 <input type="number" id="seed_textgenerationwebui" class="text_pole textAlignCenter" min="-1" value="-1" />
1492 </div>1503 </div>
1493 <div id="banned_tokens_block_ooba" class="wide100p">1504 <div id="banned_tokens_block_ooba" class="wide100p">
public/scripts/textgen-settings.js+4 -6
@@ -188,7 +188,6 @@ const settings = {
188 xtc_threshold: 0.1,188 xtc_threshold: 0.1,
189 xtc_probability: 0,189 xtc_probability: 0,
190 include_stop_str_in_output: false,190 include_stop_str_in_output: false,
191 guided_regex: '',
192};191};
193192
194export let textgenerationwebui_banned_in_macros = [];193export let textgenerationwebui_banned_in_macros = [];
@@ -262,7 +261,6 @@ export const setting_names = [
262 'xtc_threshold',261 'xtc_threshold',
263 'xtc_probability',262 'xtc_probability',
264 'include_stop_str_in_output',263 'include_stop_str_in_output',
265 'guided_regex',
266];264];
267265
268const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba');266const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba');
@@ -1207,7 +1205,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
1207 'presence_penalty': settings.presence_pen,1205 'presence_penalty': settings.presence_pen,
1208 'repetition_penalty': settings.rep_pen,1206 'repetition_penalty': settings.rep_pen,
1209 'seed': settings.seed,1207 'seed': settings.seed,
1210 'stop': settings.stopping_strings,1208 'stop': getStoppingStrings(isImpersonate, isContinue),
1211 'temperature': settings.temp,1209 'temperature': settings.temp,
1212 'temperature_last': settings.temperature_last,1210 'temperature_last': settings.temperature_last,
1213 'top_p': settings.top_p,1211 'top_p': settings.top_p,
@@ -1221,6 +1219,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
1221 'smoothing_factor': settings.smoothing_factor,1219 'smoothing_factor': settings.smoothing_factor,
1222 'smoothing_curve': settings.smoothing_curve,1220 'smoothing_curve': settings.smoothing_curve,
1223 'use_beam_search': settings.use_beam_search,1221 'use_beam_search': settings.use_beam_search,
1222 'best_of': settings.num_beams > 1 ? settings.num_beams : settings.n,
1224 'length_penalty': settings.length_penalty,1223 'length_penalty': settings.length_penalty,
1225 'early_stopping': settings.early_stopping,1224 'early_stopping': settings.early_stopping,
1226 'ignore_eos': settings.ignore_eos_token,1225 'ignore_eos': settings.ignore_eos_token,
@@ -1230,8 +1229,6 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
1230 'spaces_between_special_tokens': settings.spaces_between_special_tokens,1229 'spaces_between_special_tokens': settings.spaces_between_special_tokens,
1231 'guided_grammar': settings.grammar_string,1230 'guided_grammar': settings.grammar_string,
1232 'guided_json': settings.json_schema,1231 'guided_json': settings.json_schema,
1233
1234
1235 };1232 };
12361233
1237 if (settings.type === OPENROUTER) {1234 if (settings.type === OPENROUTER) {
@@ -1271,7 +1268,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
1271 break;1268 break;
12721269
1273 case APHRODITE:1270 case APHRODITE:
1274 params = Object.assign(aphroditeParams);1271 // set params to aphroditeParams
1272 params = Object.assign(params, aphroditeParams);
1275 break;1273 break;
12761274
1277 default:1275 default: