pub fn typical_sample_batch(
logits: &[f64],
n: usize,
vocab: usize,
cfg: &TypicalConfig,
rng: &mut LcgRng,
) -> SeqResult<Vec<usize>>Expand description
Batch variant of typical_sample for n independent rows of length
vocab in a flat logits buffer.
ยงErrors
SeqError::EmptyInputiflogitsis empty,n == 0, orvocab == 0.SeqError::ShapeMismatchiflogits.len() != n * vocab.