IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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).

Python function

short_conv_ring

short_conv_ring()​

max.nn.state_space.short_conv_ring(x, weight, ring, input_row_offsets, positions, conv_rows, layer_row, *, commit)

source

Returns x + conv(x) over a ragged batch, optionally committing the chunk to ring.

Parameters:

  • x (TensorValue) – [total_seq_len, channels] input.
  • weight (TensorValue) – [channels, kernel_size] taps; the last multiplies the current token.
  • ring (BufferValue) – [slots, ring_len, channels] conv state; written in place when commit is set.
  • input_row_offsets (TensorValue) – [batch + 1] uint32.
  • positions (TensorValue) – [total_seq_len] uint32 position per token.
  • conv_rows (TensorValue) – [num_layers, batch] uint32 ring slot per sequence.
  • layer_row (TensorValue) – Scalar uint32 CPU row of conv_rows this layer reads.
  • commit (bool) – Whether to write each sequence’s last ring_len rows of x into its slot of ring.

Returns:

Same shape and dtype as x.

Return type:

TensorValue