llm_chain_llama_sys

Function llama_sample_token

Source
pub unsafe extern "C" fn llama_sample_token(
    ctx: *mut llama_context,
    candidates: *mut llama_token_data_array,
) -> llama_token
Expand description

@details Randomly selects a token from the candidates based on their probabilities.