|
@@ -235,7 +235,7 @@
|
|
|
id="steps-range"
|
|
|
type="range"
|
|
|
min="0"
|
|
|
- max="1"
|
|
|
+ max="2"
|
|
|
step="0.05"
|
|
|
bind:value={params.temperature}
|
|
|
class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
|
@@ -247,7 +247,7 @@
|
|
|
type="number"
|
|
|
class=" bg-transparent text-center w-14"
|
|
|
min="0"
|
|
|
- max="1"
|
|
|
+ max="2"
|
|
|
step="any"
|
|
|
/>
|
|
|
</div>
|
|
@@ -499,7 +499,7 @@
|
|
|
id="steps-range"
|
|
|
type="range"
|
|
|
min="0"
|
|
|
- max="100"
|
|
|
+ max="1000"
|
|
|
step="0.5"
|
|
|
bind:value={params.top_k}
|
|
|
class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
|
@@ -633,7 +633,7 @@
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
|
<Tooltip
|
|
|
content={$i18n.t(
|
|
|
- 'Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. (Default: 1.1)'
|
|
|
+ 'Sets a scaling bias against tokens to penalize repetitions, based on how many times they have appeared. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. At 0, it is disabled. (Default: 1.1)'
|
|
|
)}
|
|
|
placement="top-start"
|
|
|
className="inline-tooltip"
|
|
@@ -665,7 +665,7 @@
|
|
|
<input
|
|
|
id="steps-range"
|
|
|
type="range"
|
|
|
- min="0"
|
|
|
+ min="-2"
|
|
|
max="2"
|
|
|
step="0.05"
|
|
|
bind:value={params.frequency_penalty}
|
|
@@ -677,7 +677,120 @@
|
|
|
bind:value={params.frequency_penalty}
|
|
|
type="number"
|
|
|
class=" bg-transparent text-center w-14"
|
|
|
- min="0"
|
|
|
+ min="-2"
|
|
|
+ max="2"
|
|
|
+ step="any"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class=" py-0.5 w-full justify-between">
|
|
|
+ <Tooltip
|
|
|
+ content={$i18n.t(
|
|
|
+ 'Sets a flat bias against tokens that have appeared at least once. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. At 0, it is disabled. (Default: 0)'
|
|
|
+ )}
|
|
|
+ placement="top-start"
|
|
|
+ className="inline-tooltip"
|
|
|
+ >
|
|
|
+ <div class="flex w-full justify-between">
|
|
|
+ <div class=" self-center text-xs font-medium">
|
|
|
+ {$i18n.t('Presence Penalty')}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <button
|
|
|
+ class="p-1 px-3 text-xs flex rounded transition flex-shrink-0 outline-none"
|
|
|
+ type="button"
|
|
|
+ on:click={() => {
|
|
|
+ params.presence_penalty = (params?.presence_penalty ?? null) === null ? 0.0 : null;
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {#if (params?.presence_penalty ?? null) === null}
|
|
|
+ <span class="ml-2 self-center">{$i18n.t('Default')}</span>
|
|
|
+ {:else}
|
|
|
+ <span class="ml-2 self-center">{$i18n.t('Custom')}</span>
|
|
|
+ {/if}
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </Tooltip>
|
|
|
+
|
|
|
+ {#if (params?.presence_penalty ?? null) !== null}
|
|
|
+ <div class="flex mt-0.5 space-x-2">
|
|
|
+ <div class=" flex-1">
|
|
|
+ <input
|
|
|
+ id="steps-range"
|
|
|
+ type="range"
|
|
|
+ min="-2"
|
|
|
+ max="2"
|
|
|
+ step="0.05"
|
|
|
+ bind:value={params.presence_penalty}
|
|
|
+ class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <input
|
|
|
+ bind:value={params.presence_penalty}
|
|
|
+ type="number"
|
|
|
+ class=" bg-transparent text-center w-14"
|
|
|
+ min="-2"
|
|
|
+ max="2"
|
|
|
+ step="any"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class=" py-0.5 w-full justify-between">
|
|
|
+ <Tooltip
|
|
|
+ content={$i18n.t(
|
|
|
+ 'Control the repetition of token sequences in the generated text. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 1.1) will be more lenient. At 1, it is disabled. (Default: 1.1)'
|
|
|
+ )}
|
|
|
+ placement="top-start"
|
|
|
+ className="inline-tooltip"
|
|
|
+ >
|
|
|
+ <div class="flex w-full justify-between">
|
|
|
+ <div class=" self-center text-xs font-medium">
|
|
|
+ {$i18n.t('Repeat Penalty (Ollama)')}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <button
|
|
|
+ class="p-1 px-3 text-xs flex rounded transition flex-shrink-0 outline-none"
|
|
|
+ type="button"
|
|
|
+ on:click={() => {
|
|
|
+ params.repeat_penalty = (params?.repeat_penalty ?? null) === null ? 1.1 : null;
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {#if (params?.repeat_penalty ?? null) === null}
|
|
|
+ <span class="ml-2 self-center">{$i18n.t('Default')}</span>
|
|
|
+ {:else}
|
|
|
+ <span class="ml-2 self-center">{$i18n.t('Custom')}</span>
|
|
|
+ {/if}
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </Tooltip>
|
|
|
+
|
|
|
+ {#if (params?.repeat_penalty ?? null) !== null}
|
|
|
+ <div class="flex mt-0.5 space-x-2">
|
|
|
+ <div class=" flex-1">
|
|
|
+ <input
|
|
|
+ id="steps-range"
|
|
|
+ type="range"
|
|
|
+ min="-2"
|
|
|
+ max="2"
|
|
|
+ step="0.05"
|
|
|
+ bind:value={params.repeat_penalty}
|
|
|
+ class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <input
|
|
|
+ bind:value={params.repeat_penalty}
|
|
|
+ type="number"
|
|
|
+ class=" bg-transparent text-center w-14"
|
|
|
+ min="-2"
|
|
|
max="2"
|
|
|
step="any"
|
|
|
/>
|