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).

Mojo module

short_conv_ring

Depthwise causal short convolution over a ring of past inputs.

A request's conv state is a ring indexed by absolute position: the input at position p lives at ring[p % R]. A forward is two launches that never touch the same entry:

  • short_conv_ring_fwd: x + conv(x). A tap at p - j reads x when it is inside the chunk, the ring when it is before the chunk, and zero before position zero. Writes nothing.
  • short_conv_ring_commit: writes each sequence's last R inputs into their entries. Reads nothing.

One code path therefore covers decode, prefill, mixed batches and speculative verify. A rejected draft token's entry is overwritten once the sequence passes its position again, so R must be width - 1 plus the largest rollback.

Functions​

Was this page helpful?