File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -342,10 +342,12 @@ impl LlamacppSampler {
342
342
error ! ( "Failed to init sampler" ) ;
343
343
return None ;
344
344
}
345
- let top_k = unsafe { llamacpp:: sampler_init_top_k ( req. top_k ) } ;
346
- let top_p = unsafe { llamacpp:: sampler_init_top_p ( req. top_p , req. min_keep ) } ;
347
- let typical_p = unsafe { llamacpp:: sampler_init_typical ( req. typical_p , req. min_keep ) } ;
348
- let temp = unsafe { llamacpp:: sampler_init_temp ( req. temp ) } ;
345
+ unsafe {
346
+ let top_k = llamacpp:: sampler_init_top_k ( req. top_k ) ;
347
+ let top_p = llamacpp:: sampler_init_top_p ( req. top_p , req. min_keep ) ;
348
+ let typical_p = llamacpp:: sampler_init_typical ( req. typical_p , req. min_keep ) ;
349
+ let temp = llamacpp:: sampler_init_temp ( req. temp ) ;
350
+ }
349
351
let penalties = unsafe {
350
352
llamacpp:: sampler_init_penalties (
351
353
req. penalty_last_n ,
You can’t perform that action at this time.
0 commit comments