From 3a8bd578cb0d9fc800c900f033bcb06d09ff6392 Mon Sep 17 00:00:00 2001 From: lmg-anon <139719567+lmg-anon@users.noreply.github.com> Date: Sat, 30 Nov 2024 15:36:42 -0300 Subject: [PATCH] Allow string banning with temperature 0 --- mikupad.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/mikupad.html b/mikupad.html index 4ad678f..dba838a 100644 --- a/mikupad.html +++ b/mikupad.html @@ -6410,12 +6410,6 @@ onValueChange=${(v) => enabledSamplers.indexOf('dry') === -1 ? setEnabledSamplers((es) => [...es, 'dry']) : setEnabledSamplers((es) => es.filter((s) => s !== 'dry'))}/> - <${Checkbox} label="Banned Strings" - disabled=${!!cancel} - value=${enabledSamplers.includes('ban_tokens')} - onValueChange=${(v) => enabledSamplers.indexOf('ban_tokens') === -1 - ? setEnabledSamplers((es) => [...es, 'ban_tokens']) - : setEnabledSamplers((es) => es.filter((s) => s !== 'ban_tokens'))}/> <${Checkbox} label="Top K" disabled=${!!cancel} value=${enabledSamplers.includes('top_k')} @@ -6446,6 +6440,12 @@ onValueChange=${(v) => enabledSamplers.indexOf('tfs_z') === -1 ? setEnabledSamplers((es) => [...es, 'tfs_z']) : setEnabledSamplers((es) => es.filter((s) => s !== 'tfs_z'))}/> + <${Checkbox} label="Banned Strings" + disabled=${!!cancel} + value=${enabledSamplers.includes('ban_tokens')} + onValueChange=${(v) => enabledSamplers.indexOf('ban_tokens') === -1 + ? setEnabledSamplers((es) => [...es, 'ban_tokens']) + : setEnabledSamplers((es) => es.filter((s) => s !== 'ban_tokens'))}/> `}> ${endpointAPI == API_OPENAI_COMPAT && html` <${Checkbox} label="Full OpenAI Compliance" @@ -6527,13 +6527,6 @@ readOnly=${!!cancel} value=${drySequenceBreakers} onValueChange=${setDrySequenceBreakers}/>`} - ${enabledSamplers.includes('ban_tokens') && html` - <${InputBox} label="Banned Strings (JSON array)" type="text" pattern="^\\[.*?\\]$" - className="${bannedTokensError ? 'rejected' : ''}" - tooltip="${bannedTokensError ? bannedTokensError : ''}" - readOnly=${!!cancel} - value=${bannedTokens} - onValueChange=${setBannedTokens}/>`} `} ${(enabledSamplers.includes('top_k') || enabledSamplers.includes('top_p') || enabledSamplers.includes('min_p')) && html`
@@ -6561,6 +6554,13 @@ `} `} ${(!openaiPresets || endpointAPI != API_OPENAI_COMPAT) && html` + ${enabledSamplers.includes('ban_tokens') && html` + <${InputBox} label="Banned Strings (JSON array)" type="text" pattern="^\\[.*?\\]$" + className="${bannedTokensError ? 'rejected' : ''}" + tooltip="${bannedTokensError ? bannedTokensError : ''}" + readOnly=${!!cancel} + value=${bannedTokens} + onValueChange=${setBannedTokens}/>`}