Skip to main content

domino_sample

Function domino_sample 

Source
pub fn domino_sample(
    sampler: &mut SamplerState,
    logits: &mut [f32],
    ctx: &[u32],
) -> Option<u32>
Expand description

Apply the DOMINO mask to logits if a masker is installed and active. Returns the sampled token using sample_constrained, or None if no masker is installed (caller should use plain sample).