mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
Merge pull request #2993 from theo77186/llamacpp_xtc
Enable XTC support for llama.cpp
This commit is contained in:
commit
725cfdebca
@ -1376,7 +1376,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-tg-type="koboldcpp, aphrodite, tabby, ooba" id="xtc_block" class="wide100p">
|
<div data-tg-type="koboldcpp, aphrodite, tabby, ooba, llamacpp" id="xtc_block" class="wide100p">
|
||||||
<h4 class="wide100p textAlignCenter">
|
<h4 class="wide100p textAlignCenter">
|
||||||
<label data-i18n="Exclude Top Choices (XTC)">Exclude Top Choices (XTC)</label>
|
<label data-i18n="Exclude Top Choices (XTC)">Exclude Top Choices (XTC)</label>
|
||||||
<a href="https://github.com/oobabooga/text-generation-webui/pull/6335" target="_blank">
|
<a href="https://github.com/oobabooga/text-generation-webui/pull/6335" target="_blank">
|
||||||
@ -1730,6 +1730,7 @@
|
|||||||
<div data-name="typical_p" draggable="true"><span>Typical P</span><small></small></div>
|
<div data-name="typical_p" draggable="true"><span>Typical P</span><small></small></div>
|
||||||
<div data-name="tfs_z" draggable="true"><span>Tail Free Sampling</span><small></small></div>
|
<div data-name="tfs_z" draggable="true"><span>Tail Free Sampling</span><small></small></div>
|
||||||
<div data-name="min_p" draggable="true"><span>Min P</span><small></small></div>
|
<div data-name="min_p" draggable="true"><span>Min P</span><small></small></div>
|
||||||
|
<div data-name="xtc" draggable="true"><span>Exclude Top Choices</span><small></small></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="llamacpp_samplers_default_order" class="menu_button menu_button_icon">
|
<div id="llamacpp_samplers_default_order" class="menu_button menu_button_icon">
|
||||||
<span data-i18n="Load default order">Load default order</span>
|
<span data-i18n="Load default order">Load default order</span>
|
||||||
|
@ -65,6 +65,7 @@ const LLAMACPP_DEFAULT_ORDER = [
|
|||||||
'typical_p',
|
'typical_p',
|
||||||
'top_p',
|
'top_p',
|
||||||
'min_p',
|
'min_p',
|
||||||
|
'xtc',
|
||||||
'temperature',
|
'temperature',
|
||||||
];
|
];
|
||||||
const OOBA_DEFAULT_ORDER = [
|
const OOBA_DEFAULT_ORDER = [
|
||||||
@ -834,6 +835,7 @@ function setSettingByName(setting, value, trigger) {
|
|||||||
|
|
||||||
if ('samplers' === setting) {
|
if ('samplers' === setting) {
|
||||||
value = Array.isArray(value) ? value : LLAMACPP_DEFAULT_ORDER;
|
value = Array.isArray(value) ? value : LLAMACPP_DEFAULT_ORDER;
|
||||||
|
insertMissingArrayItems(LLAMACPP_DEFAULT_ORDER, value);
|
||||||
sortLlamacppItemsByOrder(value);
|
sortLlamacppItemsByOrder(value);
|
||||||
settings.samplers = value;
|
settings.samplers = value;
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user