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
SelectiveScanUpdate
struct SelectiveScanUpdate[delta_softplus: Bool = False]
Selective scan update operation for autoregressive inference.
Performs a single step of the SSM recurrence for incremental token generation.
Tensor Shapes: - state_out: (batch, dim, dstate) - Updated state output - output: (batch, dim) - Output tensor - state_in: (batch, dim, dstate) - Input state - x: (batch, dim) - Input tensor - dt: (batch, dim) - Time delta tensor - A: (dim, dstate) - State transition matrix - B: (batch, n_groups, dstate) - Input matrix - C: (batch, n_groups, dstate) - Output matrix - D: (dim,) - Skip connection (optional, can be empty) - z: (batch, dim) - Gating tensor (optional, can be empty) - dt_bias: (dim,) - Time delta bias (optional, can be empty)
Parameters
- delta_softplus (
Bool): If True, applies softplus activation to delta values.
Implemented traits
Methods
execute
static def execute(state_out: T, output: T, state_in: T, x: T, dt: T, A: T, B: T, C: T, D: T, z: T, dt_bias: T, ctx: DeviceContext)