Skip to main content

sample_scalar

Function sample_scalar 

Source
pub fn sample_scalar(logits: &[f32]) -> usize
Expand description

Full sampling pipeline: apply temperature, softmax, then greedy (scalar reference).

Returns the selected token index.