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 struct
SelectiveScanFwdMinimal
struct SelectiveScanFwdMinimal[delta_softplus: Bool = False]
Minimal selective scan forward pass - no optional D, z, or delta_bias.
This variant avoids passing empty tensors that could have null pointers. Use when D, z, and delta_bias are not provided.
Tensor Shapes: - output: (batch, dim, seqlen) - Output tensor - x: (batch, dim, num_chunks, 2*dstate) - Checkpoint tensor for chunking - u: (batch, dim, seqlen) - Input tensor - delta: (batch, dim, seqlen) - Time step tensor - A: (dim, dstate) - State transition matrix - B: (batch, n_groups, dstate, seqlen) - Input projection - C: (batch, n_groups, dstate, seqlen) - Output projection
Parameters
- delta_softplus (
Bool): If True, applies softplus activation to delta values.
Implemented traits
Methods
execute
static def execute(output: T, x: T, u: T, delta: T, A: T, B: T, C: T, ctx: DeviceContext)