clean up

9c94348491fd63662b643130c5f09123c5ee456c

AlpinDale <alpindale@gmail.com>

2 files changed, +23 -14Ignore whitespace
public/index.html+19 -8
@@ -215,7 +215,7 @@
215215 <label class="checkbox_label">
216216 <input id="max_context_unlocked" type="checkbox" />
217217 <small><span data-i18n="unlocked">Unlocked</span>
218218 <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.&#13;Increase only if you know what you're doing."></div>
219219 </small>
220220 </label>
221221 </div>
@@ -1396,28 +1396,36 @@
13961396 </div>
13971397 </div>
13981398 </div>
13991399 <div data-tg-type="ooba, vllm, aphrodite" id="beamSearchBlock" name="beamSearchBlock" class="wide100p">
14001400 <h4 class="wide100p textAlignCenter">
14011401 <label>
14021402 <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>
14041404 </label>
14051405 </h4>
14061406 <div class="flex-container flexFlowRow alignitemscenter gap10px flexShrink">
14071407 <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>
14091412 <input class="neo-range-slider" type="range" id="num_beams_textgenerationwebui" name="volume" min="1" max="20" step="1" />
14101413 <input class="neo-range-input" type="number" min="1" max="20" step="1" data-for="num_beams_textgenerationwebui" id="num_beams_counter_textgenerationwebui">
14111414 </div>
14121415 <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>
14141420 <input class="neo-range-slider" type="range" id="length_penalty_textgenerationwebui" name="volume" min="-5" max="5" step="0.1" />
14151421 <input class="neo-range-input" type="number" min="-5" max="5" step="0.1" data-for="length_penalty_textgenerationwebui" id="length_penalty_counter_textgenerationwebui">
14161422 </div>
14171423 <div class="">
14181424 <label class="checkbox_label" for="early_stopping_textgenerationwebui">
14191425 <input type="checkbox" id="early_stopping_textgenerationwebui" checked="false" />
14201426 <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>
14211429 </label>
14221430 </div>
14231431 </div>
@@ -1487,7 +1495,10 @@
14871495 </div>
14881496 </div>
14891497 <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>
14911502 <input type="number" id="seed_textgenerationwebui" class="text_pole textAlignCenter" min="-1" value="-1" />
14921503 </div>
14931504 <div id="banned_tokens_block_ooba" class="wide100p">
public/scripts/textgen-settings.js+4 -6
@@ -188,7 +188,6 @@ const settings = {
188188 xtc_threshold: 0.1,
189189 xtc_probability: 0,
190190 include_stop_str_in_output: false,
191- guided_regex: '',
192191};
193192
194193export let textgenerationwebui_banned_in_macros = [];
@@ -262,7 +261,6 @@ export const setting_names = [
262261 'xtc_threshold',
263262 'xtc_probability',
264263 'include_stop_str_in_output',
265- 'guided_regex',
266264];
267265
268266const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba');
@@ -1207,7 +1205,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
12071205 'presence_penalty': settings.presence_pen,
12081206 'repetition_penalty': settings.rep_pen,
12091207 'seed': settings.seed,
12101208 'stop': settings.stopping_stringsgetStoppingStrings(isImpersonate, isContinue),
12111209 'temperature': settings.temp,
12121210 'temperature_last': settings.temperature_last,
12131211 'top_p': settings.top_p,
@@ -1221,6 +1219,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
12211219 'smoothing_factor': settings.smoothing_factor,
12221220 'smoothing_curve': settings.smoothing_curve,
12231221 'use_beam_search': settings.use_beam_search,
1222+ 'best_of': settings.num_beams > 1 ? settings.num_beams : settings.n,
12241223 'length_penalty': settings.length_penalty,
12251224 'early_stopping': settings.early_stopping,
12261225 'ignore_eos': settings.ignore_eos_token,
@@ -1230,8 +1229,6 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
12301229 'spaces_between_special_tokens': settings.spaces_between_special_tokens,
12311230 'guided_grammar': settings.grammar_string,
12321231 'guided_json': settings.json_schema,
1233-
1234-
12351232 };
12361233
12371234 if (settings.type === OPENROUTER) {
@@ -1271,7 +1268,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
12711268 break;
12721269
12731270 case APHRODITE:
1274- params = Object.assign(aphroditeParams);
1271+ // set params to aphroditeParams
1272+ params = Object.assign(params, aphroditeParams);
12751273 break;
12761274
12771275 default: