Merge pull request #2841 from AlpinDale/aphrosamplers chore: slight refactor of aphrodite samplers

5b8c14994792a3fd7ed32896a60df34ab2a6a1ed

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

Signed
16 files changed, +76 -56Ignore whitespace
public/index.html+36 -25
@@ -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 40968192 tokens.&#13;Increase only if you know what you're doing."></div>
219219 </small>
220220 </label>
221221 </div>
@@ -1189,7 +1189,7 @@
11891189 <input class="neo-range-slider" type="range" id="tfs_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
11901190 <input class="neo-range-input" type="number" min="0" max="1" step="0.01" data-for="tfs_textgenerationwebui" id="tfs_counter_textgenerationwebui">
11911191 </div>
11921192 <div data-tg-type="ooba,mancer,aphrodite" class="alignitemscenter flex-container flexFlowColumn flexBasis30p flexGrow flexShrink gap0">
11931193 <small>
11941194 <span data-i18n="Epsilon Cutoff">Epsilon Cutoff</span>
11951195 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Epsilon cutoff sets a probability floor below which tokens are excluded from being sampled" title="Epsilon cutoff sets a probability floor below which tokens are excluded from being sampled.&#13;In units of 1e-4; a reasonable value is 3.&#13;Set to 0 to disable."></div>
@@ -1197,7 +1197,7 @@
11971197 <input class="neo-range-slider" type="range" id="epsilon_cutoff_textgenerationwebui" name="volume" min="0" max="9" step="0.01">
11981198 <input class="neo-range-input" type="number" min="0" max="9" step="0.01" data-for="epsilon_cutoff_textgenerationwebui" id="epsilon_cutoff_counter_textgenerationwebui">
11991199 </div>
12001200 <div data-tg-type="ooba,mancer,aphrodite" class="alignitemscenter flex-container flexFlowColumn flexBasis30p flexGrow flexShrink gap0">
12011201 <small>
12021202 <span data-i18n="Eta Cutoff">Eta Cutoff</span>
12031203 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Eta_Cutoff_desc" title="Eta cutoff is the main parameter of the special Eta Sampling technique.&#13;In units of 1e-4; a reasonable value is 3.&#13;Set to 0 to disable.&#13;See the paper Truncation Sampling as Language Model Desmoothing by Hewitt et al. (2022) for details."></div>
@@ -1250,7 +1250,7 @@
12501250 <input class="neo-range-slider" type="range" id="skew_textgenerationwebui" name="volume" min="-5" max="5" step="0.01" />
12511251 <input class="neo-range-input" type="number" min="-5" max="5" step="0.01" data-for="skew_textgenerationwebui" id="skew_counter_textgenerationwebui">
12521252 </div>
12531253 <div data-tg-type="mancer, ooba, tabby, dreamgen, infermaticai, aphrodite" class="alignitemscenter flex-container flexFlowColumn flexBasis30p flexGrow flexShrink gap0">
12541254 <small data-i18n="Min Length">Min Length</small>
12551255 <input class="neo-range-slider" type="range" id="min_length_textgenerationwebui" name="volume" min="0" max="2000" step="1" />
12561256 <input class="neo-range-input" type="number" min="0" max="2000" step="1" data-for="min_length_textgenerationwebui" id="min_length_counter_textgenerationwebui">
@@ -1339,7 +1339,7 @@
13391339 </div>
13401340 </div>
13411341 </div>
13421342 <div data-tg-type="ooba, mancer, koboldcpp, tabby, llamacpp, aphrodite" id="dynatemp_block_ooba" class="wide100p">
13431343 <h4 class="wide100p textAlignCenter">
13441344 <div class="flex-container alignitemscenter justifyCenter">
13451345 <div class="checkbox_label" for="dynatemp_textgenerationwebui">
@@ -1367,7 +1367,7 @@
13671367 </div>
13681368 </div>
13691369 </div>
13701370 <div data-tg-type="ooba,aphrodite,infermaticai,koboldcpp,llamacpp,mancer,ollama,tabby" id="mirostat_block_ooba" class="wide100p">
13711371 <h4 class="wide100p textAlignCenter">
13721372 <label data-i18n="Mirostat (mode=1 is only for llama.cpp)">Mirostat</label>
13731373 <div class=" fa-solid fa-circle-info opacity50p " data-i18n="[title]Mirostat_desc" title="Mirostat is a thermostat for output perplexity.&#13;Mirostat matches the output perplexity to that of the input, thus avoiding the repetition trap&#13;(where, as the autoregressive inference produces text, the perplexity of the output tends toward zero)&#13;and the confusion trap (where the perplexity diverges).&#13;For details, see the paper Mirostat: A Neural Text Decoding Algorithm that Directly Controls Perplexity by Basu et al. (2020).&#13;Mode chooses the Mirostat version. 0=disable, 1=Mirostat 1.0 (llama.cpp only), 2=Mirostat 2.0."></div>
@@ -1396,28 +1396,36 @@
13961396 </div>
13971397 </div>
13981398 </div>
13991399 <div data-tg-type="ooba, vllm" 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" />
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">
@@ -1537,18 +1548,7 @@
15371548 </div>
15381549 </div>
15391550 </div>
15401551 <div id="json_schema_blockgrammar_block_ooba" data-tg-type="tabbyooba, llamacppaphrodite" class="wide100p">
1541- <hr class="wide100p">
1542- <h4 class="wide100p textAlignCenter"><span data-i18n="JSON Schema">JSON Schema</span>
1543- <a href="https://json-schema.org/learn/getting-started-step-by-step" target="_blank">
1544- <small>
1545- <div class="fa-solid fa-circle-question note-link-span"></div>
1546- </small>
1547- </a>
1548- </h4>
1549- <textarea id="tabby_json_schema" rows="4" class="text_pole textarea_compact monospace" data-i18n="[placeholder]Type in the desired JSON schema" placeholder="Type in the desired JSON schema"></textarea>
1550- </div>
1551- <div id="grammar_block_ooba" class="wide100p">
15521552 <hr class="wide100p">
15531553 <h4 class="wide100p textAlignCenter">
15541554 <label>
@@ -1563,6 +1563,17 @@
15631563 </h4>
15641564 <textarea id="grammar_string_textgenerationwebui" rows="4" class="text_pole textarea_compact monospace" data-i18n="[placeholder]Type in the desired custom grammar" placeholder="Type in the desired custom grammar"></textarea>
15651565 </div>
1566+ <div id="json_schema_block" data-tg-type="tabby, llamacpp, aphrodite" class="wide100p">
1567+ <hr class="wide100p">
1568+ <h4 class="wide100p textAlignCenter"><span data-i18n="JSON Schema">JSON Schema</span>
1569+ <a href="https://json-schema.org/learn/getting-started-step-by-step" target="_blank">
1570+ <small>
1571+ <div class="fa-solid fa-circle-question note-link-span"></div>
1572+ </small>
1573+ </a>
1574+ </h4>
1575+ <textarea id="tabby_json_schema" rows="4" class="text_pole textarea_compact monospace" data-i18n="[placeholder]Type in the desired JSON schema" placeholder="Type in the desired JSON schema"></textarea>
1576+ </div>
15661577 <div id="sampler_order_block_kcpp" data-tg-type="koboldcpp" class="range-block flexFlowColumn wide100p">
15671578 <hr class="wide100p">
15681579 <div class="range-block-title">
@@ -2425,7 +2436,7 @@
24252436 <div data-tg-type="openrouter" class="menu_button menu_button_icon openrouter_authorize" title="Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai" data-i18n="Authorize;[title]Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai">Authorize</div>
24262437 <div class="api_loading menu_button menu_button_icon" data-i18n="Cancel">Cancel</div>
24272438 </div>
24282439 <label data-tg-type="ooba,aphrodite" class="checkbox_label margin-bot-10px" for="legacy_api_textgenerationwebui">
24292440 <input type="checkbox" id="legacy_api_textgenerationwebui" />
24302441 <span data-i18n="Legacy API (pre-OAI, no streaming)">Legacy API (pre-OAI, no streaming)</span>
24312442 </label>
public/locales/ar-sa.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "عرض الاستجابة لحظيا كما يتم إنشاؤها.",
3333 "context size(tokens)": "حجم الاحرف (بعدد الاحرف او الرموز)",
3434 "unlocked": "مفتوح",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "قم بتمكين هذا فقط إذا كانت نموذجك يدعم مقاطع السياق بأحجام أكبر من 40968192 رمزًا.",
3636 "Max prompt cost:": "أقصى تكلفة فورية:",
3737 "Display the response bit by bit as it is generated.": "عرض الاستجابة بتدريج كما يتم إنشاؤها.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "عند إيقاف هذا الخيار، سيتم عرض الردود جميعها دفعة واحدة عند اكتمالها.",
public/locales/de-de.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Zeige die Antwort Stück für Stück an, während sie generiert wird.",
3333 "context size(tokens)": "Größe des Zusammenhangs (Tokens)",
3434 "unlocked": "Freigeschaltet",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Aktiviere dies nur, wenn dein Modell Kontextgrößen von mehr als 40968192 Tokens unterstützt.",
3636 "Max prompt cost:": "Maximale Sofortkosten:",
3737 "Display the response bit by bit as it is generated.": "Zeige die Antwort Stück für Stück, während sie generiert wird.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Wenn dies ausgeschaltet ist, werden Antworten angezeigt, sobald sie vollständig sind.",
public/locales/es-es.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Mostrar la respuesta poco a poco según se genera",
3333 "context size(tokens)": "Tamaño de contexto (tokens)",
3434 "unlocked": "Desbloqueado",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Habilita esto solo si tu modelo admite tamaños de contexto mayores de 40968192 tokens",
3636 "Max prompt cost:": "Costo inmediato máximo:",
3737 "Display the response bit by bit as it is generated.": "Mostrar la respuesta poco a poco a medida que se genera.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Cuando esto está apagado, las respuestas se mostrarán de una vez cuando estén completas.",
public/locales/fr-fr.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Afficher la réponse bit par bit au fur et à mesure de sa génération",
3333 "context size(tokens)": "Taille du contexte (en tokens)",
3434 "unlocked": "Déverrouillé",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Activez cela uniquement si votre modèle prend en charge des tailles de contexte supérieures à 40968192 tokens",
3636 "Max prompt cost:": "Coût rapide maximum :",
3737 "Display the response bit by bit as it is generated.": "Afficher la réponse morceau par morceau au fur et à mesure de sa génération.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Lorsque cette fonction est désactivée, les réponses s'affichent toutes en une fois lorsqu'elles sont complètes.",
public/locales/is-is.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Birta svarið bita fyrir bita þegar það er myndað.",
3333 "context size(tokens)": "Stærð samhengis (í táknum eða stöfum)",
3434 "unlocked": "Opinn",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Virkjið þetta aðeins ef stærð samhengis styður model meira en 40968192 tákn.",
3636 "Max prompt cost:": "Hámarks skyndikostnaður:",
3737 "Display the response bit by bit as it is generated.": "Birta svarid bita fyrir bita þegar það er búið til.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Þegar þetta er slökkt verða svör birt allt í einu þegar þau eru búin.",
public/locales/it-it.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Mostra la risposta pezzo per pezzo man mano che viene generata",
3333 "context size(tokens)": "Dimensione del contesto (token)",
3434 "unlocked": "Sbloccato",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Abilita solo se il tuo modello supporta dimensioni del contesto superiori a 40968192 token",
3636 "Max prompt cost:": "Costo massimo immediato:",
3737 "Display the response bit by bit as it is generated.": "Visualizza la risposta pezzo per pezzo mentre viene generata.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Quando questo è disattivato, le risposte verranno visualizzate tutte in una volta quando sono complete.",
public/locales/ja-jp.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "生成された応答を逐次表示します。",
3333 "context size(tokens)": "コンテキストのサイズ(トークン数)",
3434 "unlocked": "ロック解除",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "モデルが4096トークンを超えるコンテキストサイズをサポートしている場合にのみ有効にしますモデルが8192トークンを超えるコンテキストサイズをサポートしている場合にのみ有効にします",
3636 "Max prompt cost:": "最大プロンプトコスト:",
3737 "Display the response bit by bit as it is generated.": "生成されるたびに、応答を逐次表示します。",
3838 "When this is off, responses will be displayed all at once when they are complete.": "この機能がオフの場合、応答は完全に生成されたときに一度ですべて表示されます。",
public/locales/ko-kr.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "생성되는대로 응답을 조금씩 표시하십시오",
3333 "context size(tokens)": "컨텍스트 크기 (토큰)",
3434 "unlocked": "잠금 해제됨",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "모델이 40968192 토큰보다 큰 컨텍스트 크기를 지원하는 경우에만 활성화하십시오",
3636 "Max prompt cost:": "최대 프롬프트 비용:",
3737 "Display the response bit by bit as it is generated.": "생성되는 대답을 조금씩 표시합니다.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "이 기능이 꺼져 있으면 대답은 완료되면 한 번에 모두 표시됩니다.",
public/locales/nl-nl.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Toon de reactie beetje bij beetje zoals deze wordt gegenereerd",
3333 "context size(tokens)": "Contextgrootte (tokens)",
3434 "unlocked": "Ontgrendeld",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Schakel dit alleen in als uw model contextgroottes ondersteunt groter dan 40968192 tokens",
3636 "Max prompt cost:": "Maximale promptkosten:",
3737 "Display the response bit by bit as it is generated.": "Toon het antwoord stuk voor stuk terwijl het wordt gegenereerd.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Als dit uit staat, worden reacties in één keer weergegeven wanneer ze compleet zijn.",
public/locales/pt-pt.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Exibir a resposta pouco a pouco conforme ela é gerada",
3333 "context size(tokens)": "Tamanho do contexto (tokens)",
3434 "unlocked": "Desbloqueado",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Ative isso apenas se seu modelo suportar tamanhos de contexto maiores que 40968192 tokens",
3636 "Max prompt cost:": "Custo imediato máximo:",
3737 "Display the response bit by bit as it is generated.": "Exibir a resposta bit a bit conforme é gerada.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Quando isso estiver desligado, as respostas serão exibidas de uma vez quando estiverem completas.",
public/locales/ru-ru.json+1 -1
@@ -89,7 +89,7 @@
8989 "Text Completion presets": "Пресеты для Text Completion",
9090 "Documentation on sampling parameters": "Документация по параметрам сэмплеров",
9191 "Set all samplers to their neutral/disabled state.": "Установить все сэмплеры в нейтральное/отключенное состояние.",
9292 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Включайте эту опцию, только если ваша модель поддерживает размер контекста более 40968192 токенов.\nУвеличивайте только если вы знаете, что делаете.",
9393 "Wrap in Quotes": "Заключать в кавычки",
9494 "Wrap entire user message in quotes before sending.": "Перед отправкой заключать всё сообщение пользователя в кавычки.",
9595 "Leave off if you use quotes manually for speech.": "Оставьте выключенным, если вручную выставляете кавычки для прямой речи.",
public/locales/uk-ua.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "Поступово відображати відповідь по мірі її створення",
3333 "context size(tokens)": "Контекст (токени)",
3434 "unlocked": "Розблоковано",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "Увімкніть це лише в разі підтримки моделлю розмірів контексту більше 40968192 токенів",
3636 "Max prompt cost:": "Максимальна оперативна вартість:",
3737 "Display the response bit by bit as it is generated.": "Показувати відповідь по бітах по мірі її генерації.",
3838 "When this is off, responses will be displayed all at once when they are complete.": "Коли це вимкнено, відповіді будуть відображатися разом, коли вони будуть завершені.",
public/locales/zh-cn.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "逐位显示生成的回复",
3333 "context size(tokens)": "上下文长度(以词符数计)",
3434 "unlocked": "解锁",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "仅在您的模型支持大于4096个词符的上下文大小时启用此选项仅在您的模型支持大于8192个词符的上下文大小时启用此选项",
3636 "Max prompt cost:": "最大提示词费用:",
3737 "Display the response bit by bit as it is generated.": "随着回复的生成,逐位显示结果。",
3838 "When this is off, responses will be displayed all at once when they are complete.": "当此选项关闭时,回复将在完成后一次性显示。",
public/locales/zh-tw.json+1 -1
@@ -32,7 +32,7 @@
3232 "Streaming_desc": "生成時逐位顯示回應。當此功能關閉時,回應將在完成後一次顯示。",
3333 "context size(tokens)": "上下文大小(符記數)",
3434 "unlocked": "解鎖",
3535 "Only enable this if your model supports context sizes greater than 40968192 tokens": "僅在您的模型支援超過4096個符記的上下文大小時啟用此功能僅在您的模型支援超過8192個符記的上下文大小時啟用此功能",
3636 "Max prompt cost:": "最多提示詞費用",
3737 "Display the response bit by bit as it is generated.": "生成時逐位顯示回應。",
3838 "When this is off, responses will be displayed all at once when they are complete.": "關閉時,回應將在完成後一次性顯示。",
public/scripts/textgen-settings.js+26 -17
@@ -162,14 +162,9 @@ const settings = {
162162 banned_tokens: '',
163163 sampler_priority: OOBA_DEFAULT_ORDER,
164164 samplers: LLAMACPP_DEFAULT_ORDER,
165- //n_aphrodite: 1,
166- //best_of_aphrodite: 1,
167165 ignore_eos_token: false,
168166 spaces_between_special_tokens: true,
169167 speculative_ngram: false,
170- //logits_processors_aphrodite: [],
171- //log_probs_aphrodite: 0,
172- //prompt_log_probs_aphrodite: 0,
173168 type: textgen_types.OOBA,
174169 mancer_model: 'mytholite',
175170 togetherai_model: 'Gryphe/MythoMax-L2-13b',
@@ -250,14 +245,9 @@ export const setting_names = [
250245 'json_schema',
251246 'banned_tokens',
252247 'legacy_api',
253- //'n_aphrodite',
254- //'best_of_aphrodite',
255248 'ignore_eos_token',
256249 'spaces_between_special_tokens',
257250 'speculative_ngram',
258- //'logits_processors_aphrodite',
259- //'log_probs_aphrodite',
260- //'prompt_log_probs_aphrodite'
261251 'sampler_order',
262252 'sampler_priority',
263253 'samplers',
@@ -1130,8 +1120,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
11301120 'minimum_message_content_tokens': settings.type === DREAMGEN ? settings.min_length : undefined,
11311121 'min_tokens': settings.min_length,
11321122 'num_beams': settings.type === OOBA ? settings.num_beams : undefined,
11331123 'length_penalty': settings.type === OOBA ? settings.length_penalty : undefined,
11341124 'early_stopping': settings.type === OOBA ? settings.early_stopping : undefined,
11351125 'add_bos_token': settings.add_bos_token,
11361126 'dynamic_temperature': dynatemp ? true : undefined,
11371127 'dynatemp_low': dynatemp ? settings.min_temp : undefined,
@@ -1208,13 +1198,31 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
12081198 };
12091199 const aphroditeParams = {
12101200 'n': canMultiSwipe ? settings.n : 1,
12111201 'best_offrequency_penalty': canMultiSwipe ? settings.n : 1freq_pen,
1202+ 'presence_penalty': settings.presence_pen,
1203+ 'repetition_penalty': settings.rep_pen,
1204+ 'seed': settings.seed,
1205+ 'stop': getStoppingStrings(isImpersonate, isContinue),
1206+ 'temperature': settings.temp,
1207+ 'temperature_last': settings.temperature_last,
1208+ 'top_p': settings.top_p,
1209+ 'top_k': settings.top_k,
1210+ 'top_a': settings.top_a,
1211+ 'min_p': settings.min_p,
1212+ 'tfs': settings.tfs,
1213+ 'eta_cutoff': settings.eta_cutoff,
1214+ 'epsilon_cutoff': settings.epsilon_cutoff,
1215+ 'typical_p': settings.typical_p,
1216+ 'smoothing_factor': settings.smoothing_factor,
1217+ 'smoothing_curve': settings.smoothing_curve,
12121218 'ignore_eos': settings.ignore_eos_token,
1219+ 'min_tokens': settings.min_length,
1220+ 'skip_special_tokens': settings.skip_special_tokens,
12131221 'spaces_between_special_tokens': settings.spaces_between_special_tokens,
12141222 'grammarguided_grammar': settings.grammar_string,
12151223 //'logits_processorsguided_json': settings.logits_processors_aphroditejson_schema,
1216- //'logprobs': settings.log_probs_aphrodite,
1224+ 'early_stopping': false, // hacks
12171225 //'prompt_logprobsinclude_stop_str_in_output': settings.prompt_log_probs_aphroditefalse,
12181226 };
12191227
12201228 if (settings.type === OPENROUTER) {
@@ -1254,6 +1262,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
12541262 break;
12551263
12561264 case APHRODITE:
1265+ // set params to aphroditeParams
12571266 params = Object.assign(params, aphroditeParams);
12581267 break;
12591268