|
@@ -21,6 +21,8 @@
|
|
|
top_p: null,
|
|
|
tfs_z: null,
|
|
|
num_ctx: null,
|
|
|
+ num_batch: null,
|
|
|
+ num_keep: null,
|
|
|
max_tokens: null,
|
|
|
use_mmap: null,
|
|
|
use_mlock: null,
|
|
@@ -565,6 +567,98 @@
|
|
|
{/if}
|
|
|
</div>
|
|
|
|
|
|
+ <div class=" py-0.5 w-full justify-between">
|
|
|
+ <div class="flex w-full justify-between">
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Batch Size (num_batch)')}</div>
|
|
|
+
|
|
|
+ <button
|
|
|
+ class="p-1 px-3 text-xs flex rounded transition"
|
|
|
+ type="button"
|
|
|
+ on:click={() => {
|
|
|
+ params.num_batch = (params?.num_batch ?? null) === null ? 512 : null;
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {#if (params?.num_batch ?? 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>
|
|
|
+
|
|
|
+ {#if (params?.num_batch ?? null) !== null}
|
|
|
+ <div class="flex mt-0.5 space-x-2">
|
|
|
+ <div class=" flex-1">
|
|
|
+ <input
|
|
|
+ id="steps-range"
|
|
|
+ type="range"
|
|
|
+ min="256"
|
|
|
+ max="8192"
|
|
|
+ step="256"
|
|
|
+ bind:value={params.num_batch}
|
|
|
+ class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="">
|
|
|
+ <input
|
|
|
+ bind:value={params.num_batch}
|
|
|
+ type="number"
|
|
|
+ class=" bg-transparent text-center w-14"
|
|
|
+ min="256"
|
|
|
+ step="256"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class=" py-0.5 w-full justify-between">
|
|
|
+ <div class="flex w-full justify-between">
|
|
|
+ <div class=" self-center text-xs font-medium">
|
|
|
+ {$i18n.t('Tokens To Keep On Context Refresh (num_keep)')}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <button
|
|
|
+ class="p-1 px-3 text-xs flex rounded transition"
|
|
|
+ type="button"
|
|
|
+ on:click={() => {
|
|
|
+ params.num_keep = (params?.num_keep ?? null) === null ? 24 : null;
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {#if (params?.num_keep ?? 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>
|
|
|
+
|
|
|
+ {#if (params?.num_keep ?? null) !== null}
|
|
|
+ <div class="flex mt-0.5 space-x-2">
|
|
|
+ <div class=" flex-1">
|
|
|
+ <input
|
|
|
+ id="steps-range"
|
|
|
+ type="range"
|
|
|
+ min="-1"
|
|
|
+ max="10240000"
|
|
|
+ step="1"
|
|
|
+ bind:value={params.num_keep}
|
|
|
+ class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="">
|
|
|
+ <input
|
|
|
+ bind:value={params.num_keep}
|
|
|
+ type="number"
|
|
|
+ class=" bg-transparent text-center w-14"
|
|
|
+ min="-1"
|
|
|
+ step="1"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class=" py-0.5 w-full justify-between">
|
|
|
<div class="flex w-full justify-between">
|
|
|
<div class=" self-center text-xs font-medium">{$i18n.t('Max Tokens (num_predict)')}</div>
|