llama_sampler_init_penalties function
NOTE: Avoid using on the full vocabulary as searching for repeated tokens can become slow. For example, apply top-k or top-p sampling first.
Implementation
@ffi.Native<
ffi.Pointer<llama_sampler> Function(
ffi.Int32,
ffi.Float,
ffi.Float,
ffi.Float,
)
>()
external ffi.Pointer<llama_sampler> llama_sampler_init_penalties(
int penalty_last_n,
double penalty_repeat,
double penalty_freq,
double penalty_present,
);