pub fn apply_output_gate(attn: &[f32], g: &[f32], enabled: bool) -> Vec<f32>
Apply sigmoid(g) ⊙ attn when the output gate is on; otherwise identity.
sigmoid(g) ⊙ attn