kda_reference_layer

Function kda_reference_layer 

Source
pub fn kda_reference_layer(
    hidden: &[f32],
    q: &[f32],
    k: &[f32],
    v: &[f32],
    w: &KdaWeights<'_>,
    dims: KdaDims,
    lower_bound: f32,
    rms_eps: f32,
    state: &mut [f32],
) -> Vec<f32>
Expand description

End-to-end reference for one KDA layer, from post-conv q/k/v to o_proj output.

The short conv is intentionally excluded: it is REUSE against Atlas’s existing fused conv+SiLU+L2 kernel, and folding it in would couple two independent checks.