For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
causal_conv1d_update
def causal_conv1d_update[dtype: DType, //](output: MutTileTensor[dtype, Engine=output.Engine, linear_idx_type=output.linear_idx_type], conv_state: MutTileTensor[dtype, Engine=conv_state.Engine, linear_idx_type=conv_state.linear_idx_type], input: ImmTileTensor[dtype, Engine=input.Engine, linear_idx_type=input.linear_idx_type], conv_state_in: ImmTileTensor[dtype, Engine=conv_state_in.Engine, linear_idx_type=conv_state_in.linear_idx_type], weight: ImmTileTensor[dtype, Engine=weight.Engine, linear_idx_type=weight.linear_idx_type], bias: ImmTileTensor[dtype, Engine=bias.Engine, linear_idx_type=bias.linear_idx_type], silu_activation: Bool, ctx: DeviceContext)
Runs the causal_conv1d_update op, writing the new state separately.
Parameters:
- dtype (
DType): Element type of every tensor.
Args:
- output (
MutTileTensor[dtype, Engine=output.Engine, linear_idx_type=output.linear_idx_type]): Convolution output with the shape ofinput. - conv_state (
MutTileTensor[dtype, Engine=conv_state.Engine, linear_idx_type=conv_state.linear_idx_type]): Updated state with shape(batch, channels, state_len). - input (
ImmTileTensor[dtype, Engine=input.Engine, linear_idx_type=input.linear_idx_type]): New input tokens with shape(batch, channels, seqlen). - conv_state_in (
ImmTileTensor[dtype, Engine=conv_state_in.Engine, linear_idx_type=conv_state_in.linear_idx_type]): Previous state with the shape ofconv_state. - weight (
ImmTileTensor[dtype, Engine=weight.Engine, linear_idx_type=weight.linear_idx_type]): Weights with shape(channels, width). - bias (
ImmTileTensor[dtype, Engine=bias.Engine, linear_idx_type=bias.linear_idx_type]): Per-channel bias with shape(channels,). - silu_activation (
Bool): Whether to apply SiLU after the convolution. - ctx (
DeviceContext): Device context to run on.