For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
gated_delta_conv1d_fwd_shape
def gated_delta_conv1d_fwd_shape[work_dtype: DType, state_dtype: DType](qkv_input_ragged: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=qkv_input_ragged.static_spec], conv_weight: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=conv_weight.static_spec], conv_state: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=conv_state.static_spec], slot_idx: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=slot_idx.static_spec], input_row_offsets: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input_row_offsets.static_spec]) -> IndexList[Int(2)]
Computes the output shape for the gated_delta_conv1d_fwd graph op.
Parameters:
- βwork_dtype (
DType): Element type of the per-token input and weight tensors (inferred). - βstate_dtype (
DType): Element type of the persistent conv-state pool, independent ofwork_dtype(inferred).
Args:
- βqkv_input_ragged (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=qkv_input_ragged.static_spec]): Ragged QKV input tensor of shape[total_seq_len, conv_dim]. - βconv_weight (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=conv_weight.static_spec]): Convolution filter of shape[conv_dim, kernel_size]. - βconv_state (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=conv_state.static_spec]): Mutable conv-state pool of shape[max_slots, conv_dim, kernel_size-1]. - βslot_idx (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=slot_idx.static_spec]): Per-batch slot indices into the conv-state pool, shape[batch_size]. - βinput_row_offsets (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input_row_offsets.static_spec]): Cumulative row offsets per batch, shape[batch_size + 1].
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!