route_from_logits

Function route_from_logits 

Source
pub fn route_from_logits(
    logits: &[f32],
    tokens: usize,
    bias: &[f32],
    c: &MoeV41Cfg,
) -> (Vec<f32>, Vec<usize>)
Expand description

2026-09-25: deepseek_v41_ref::moe::gate on f32 logits: returns (weights[tokens, topk], indices[tokens, topk]), each token’s picks in descending score + bias order, ties to the lower expert id. Panics on a NaN key.