pub fn sample_token(logits: &[f32], opts: SampleOpts) -> usizeExpand description
Sample one token id from a [vocab] logits slice. Returns the
chosen index. Stateless w.r.t. prior calls — the RNG is seeded
per-call from opts.seed so repeated calls with the same seed
and logits yield the same token.