@@ -211,6 +211,20 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
211211 < input type ="checkbox " />
212212 < div class ="collapse-title font-bold "> Advanced config</ div >
213213 < div class ="collapse-content ">
214+ < div class ="label "> Samplers</ div >
215+ < template v-for ="key in ['dynatemp_range', 'dynatemp_exponent', 'typical_p', 'xtc_probability', 'xtc_threshold'] ">
216+ < label class ="input input-bordered flex items-center gap-2 mb-2 ">
217+ < b > {{ key }}</ b >
218+ < input type ="text " class ="grow " :placeholder ="'Default: ' + (configDefault[key] || 'none') " v-model ="config[key] " />
219+ </ label >
220+ </ template >
221+ < div class ="label "> Penalties</ div >
222+ < template v-for ="key in ['repeat_last_n', 'repeat_penalty', 'presence_penalty', 'frequency_penalty', 'dry_multiplier', 'dry_base', 'dry_allowed_length', 'dry_penalty_last_n'] ">
223+ < label class ="input input-bordered flex items-center gap-2 mb-2 ">
224+ < b > {{ key }}</ b >
225+ < input type ="text " class ="grow " :placeholder ="'Default: ' + (configDefault[key] || 'none') " v-model ="config[key] " />
226+ </ label >
227+ </ template >
214228 < label class ="form-control mb-2 ">
215229 < div class ="label inline "> Custom JSON config (For more info, refer to < a class ="underline " href ="https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md " target ="_blank " rel ="noopener noreferrer "> server documentation</ a > )</ div >
216230 < textarea class ="textarea textarea-bordered h-24 " placeholder ="Example: { "mirostat": 1, "min_p": 0.1 } " v-model ="config.custom "> </ textarea >
@@ -245,9 +259,22 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
245259 systemMessage : 'You are a helpful assistant.' ,
246260 // make sure these default values are in sync with `common.h`
247261 temperature : 0.8 ,
262+ dynatemp_range : 0.0 ,
263+ dynatemp_exponent : 1.0 ,
248264 top_k : 40 ,
249265 top_p : 0.95 ,
250266 min_p : 0.05 ,
267+ xtc_probability : 0.0 ,
268+ xtc_threshold : 0.1 ,
269+ typical_p : 1.0 ,
270+ repeat_last_n : 64 ,
271+ repeat_penalty : 1.0 ,
272+ presence_penalty : 0.0 ,
273+ frequency_penalty : 0.0 ,
274+ dry_multiplier : 0.0 ,
275+ dry_base : 1.75 ,
276+ dry_allowed_length : 2 ,
277+ dry_penalty_last_n : - 1 ,
251278 max_tokens : - 1 ,
252279 custom : '' , // custom json-stringified object
253280 } ;
@@ -452,8 +479,22 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
452479 stream : true ,
453480 cache_prompt : true ,
454481 temperature : this . config . temperature ,
482+ dynatemp_range : this . config . dynatemp_range ,
483+ dynatemp_exponent : this . config . dynatemp_exponent ,
455484 top_k : this . config . top_k ,
456485 top_p : this . config . top_p ,
486+ min_p : this . config . min_p ,
487+ typical_p : this . config . typical_p ,
488+ xtc_probability : this . config . xtc_probability ,
489+ xtc_threshold : this . config . xtc_threshold ,
490+ repeat_last_n : this . config . repeat_last_n ,
491+ repeat_penalty : this . config . repeat_penalty ,
492+ presence_penalty : this . config . presence_penalty ,
493+ frequency_penalty : this . config . frequency_penalty ,
494+ dry_multiplier : this . config . dry_multiplier ,
495+ dry_base : this . config . dry_base ,
496+ dry_allowed_length : this . config . dry_allowed_length ,
497+ dry_penalty_last_n : this . config . dry_penalty_last_n ,
457498 max_tokens : this . config . max_tokens ,
458499 ...( this . config . custom . length ? JSON . parse ( this . config . custom ) : { } ) ,
459500 ...( this . config . apiKey ? { api_key : this . config . apiKey } : { } ) ,
0 commit comments