llama.vim : update infill API params [no ci]

This commit is contained in:
Georgi Gerganov 2024-10-15 11:49:20 +03:00
parent 060573f7e8
commit 847c8c023e
No known key found for this signature in database
GPG key ID: BF970631944C16B7

View file

@ -287,16 +287,16 @@ function! s:ring_update()
" no samplers needed here " no samplers needed here
let l:request = json_encode({ let l:request = json_encode({
\ 'prompt': "",
\ 'input_prefix': "", \ 'input_prefix': "",
\ 'input_suffix': "", \ 'input_suffix': "",
\ 'input_extra': l:extra_context,
\ 'prompt': "",
\ 'n_predict': 1, \ 'n_predict': 1,
\ 'penalty_last_n': 0, \ 'penalty_last_n': 0,
\ 'temperature': 0.0, \ 'temperature': 0.0,
\ 'stream': v:false, \ 'stream': v:false,
\ 'samplers': ["temperature"], \ 'samplers': ["temperature"],
\ 'cache_prompt': v:true, \ 'cache_prompt': v:true,
\ 'extra_context': l:extra_context,
\ 't_max_prompt_ms': 1, \ 't_max_prompt_ms': 1,
\ 't_max_predict_ms': 1 \ 't_max_predict_ms': 1
\ }) \ })
@ -379,8 +379,9 @@ function! llama#fim(is_auto, on_hold) abort
let l:request = json_encode({ let l:request = json_encode({
\ 'input_prefix': l:prefix, \ 'input_prefix': l:prefix,
\ 'prompt': l:prompt,
\ 'input_suffix': l:suffix, \ 'input_suffix': l:suffix,
\ 'input_extra': l:extra_context,
\ 'prompt': l:prompt,
\ 'n_predict': g:llama_config.n_predict, \ 'n_predict': g:llama_config.n_predict,
\ 'penalty_last_n': 0, \ 'penalty_last_n': 0,
\ 'top_k': 40, \ 'top_k': 40,
@ -388,7 +389,6 @@ function! llama#fim(is_auto, on_hold) abort
\ 'stream': v:false, \ 'stream': v:false,
\ 'samplers': ["top_k", "top_p", "infill"], \ 'samplers': ["top_k", "top_p", "infill"],
\ 'cache_prompt': v:true, \ 'cache_prompt': v:true,
\ 'extra_context': l:extra_context,
\ 't_max_prompt_ms': g:llama_config.t_max_prompt_ms, \ 't_max_prompt_ms': g:llama_config.t_max_prompt_ms,
\ 't_max_predict_ms': g:llama_config.t_max_predict_ms \ 't_max_predict_ms': g:llama_config.t_max_predict_ms
\ }) \ })