Skip to main content

constrained_beam_decode

Function constrained_beam_decode 

Source
pub fn constrained_beam_decode(
    index: &StaticIndex,
    flat_logits: &[f32],
    sid_length: usize,
    beam_width: usize,
) -> Vec<Vec<u32>>
Expand description

Runs the full decode loop using a static flat logit vector (same logits repeated for every batch entry, beam, and step). Useful for unit tests where the model is not available.