llama_beam_search method
void
llama_beam_search(
- Pointer<
llama_context> ctx, - llama_beam_search_callback_fn_t callback,
- Pointer<
Void> callback_data, - int n_beams,
- int n_past,
- int n_predict,
@details Deterministically returns entire sentence constructed by a beam search. @param ctx Pointer to the llama_context. @param callback Invoked for each iteration of the beam_search loop, passing in beams_state. @param callback_data A pointer that is simply passed back to callback. @param n_beams Number of beams to use. @param n_past Number of tokens already evaluated. @param n_predict Maximum number of tokens to predict. EOS may occur earlier.
Implementation
void llama_beam_search(
ffi.Pointer<llama_context> ctx,
llama_beam_search_callback_fn_t callback,
ffi.Pointer<ffi.Void> callback_data,
int n_beams,
int n_past,
int n_predict,
) {
return _llama_beam_search(
ctx,
callback,
callback_data,
n_beams,
n_past,
n_predict,
);
}