Skip to main content

topk_cpu

Function topk_cpu 

Source
pub fn topk_cpu(logits: &[f32], k: usize) -> Vec<TopKItem>
Expand description

CPU reference top-K over a full logit vector. Drops −∞ (e.g. masked) entries.