Skip to main content

typical_sample_batch

Function typical_sample_batch 

Source
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