Skip to main content

step_causal_conv1d

Function step_causal_conv1d 

pub fn step_causal_conv1d(
    conv_state: &mut [f32],
    conv_weights: &[f32],
    input: &[f32],
    out: &mut [f32],
) -> Result<(), QwenStateError>
Expand description

Update causal 1D depthwise convolution state and produce convolved output.

conv_state: History buffer of length (CAUSAL_CONV_KERNEL - 1) * channels. conv_weights: Filter weights of length CAUSAL_CONV_KERNEL * channels. input: Current token input features of length channels. out: Output features of length channels.

Zero-heap: modifies conv_state in place and writes to caller-supplied out.