Skip to main content

inject_hyper_update

Function inject_hyper_update 

pub fn inject_hyper_update(
    residual: &mut [f32],
    branch: &[f32],
    inject: &[f32],
    streams: usize,
    hidden: usize,
) -> Result<(), StreamedHyperError>
Expand description

Scatter a token-mixer/MoE branch back into each residual stream. Qwen4Exp uses one learned inject scalar per stream, divided by the stream count.