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 package
state_space
State space model kernels for Mamba and related architectures.
This package provides GPU and CPU kernel implementations for the selective scan, causal conv1d, and SSD (state-space duality) operations used by Mamba, Mamba-2, and Gated DeltaNet models, including variable-length sequence variants for continuous-batching inference.
Kernel operation registrations live in the *_ops modules where present; the
variable-length forward paths are registered in the built-in kernel library.
Modules
-
causal_conv1d: Core Causal Conv1D Kernel Implementations. -
causal_conv1d_ops: Causal Conv1D operation registrations for state space models. -
gated_delta: Gated DeltaNet recurrence kernel for Qwen3.5: Pass 2 of two-pass prefill. -
gated_delta_conv1d: Causal depthwise conv1d for the Gated DeltaNet two-pass prefill. -
gated_group_rmsnorm: Fused gated group-RMSNorm for the Mamba-2 mixer (norm_before_gate=False). -
mamba2_replay_fold: Commits a speculative verify's accepted rows to every Mamba-2 layer at once. -
mamba2_ssd_chunked: Chunked Mamba-2 SSD prefill scan (varlen, in-place state pool). -
mamba2_ssd_out_mi355: The chunked Mamba-2 scan's output stage on MI355 (gfx950). -
mamba2_ssd_out_sm100: The chunked Mamba-2 scan's output stage on SM100 (B200). -
mamba2_ssd_scan: Mamba-2 SSD (state-space duality) varlen scan with an in-place state pool. -
mamba2_ssd_state_mi355: The chunked Mamba-2 scan's chunk state on MI355 (gfx950). -
mamba2_ssd_state_sm100: The chunked Mamba-2 scan's chunk state on SM100 (B200). -
pdl_wait: Grid-dependency wait that keeps the loads after it behind it (SM90+). -
rms_norm_fused_residual: RMSNorm with fused residual connection for state space models. -
rms_norm_fused_residual_ops: RMSNorm fused residual op registration for state space models. -
row_rule: The mixed-verify row rule: a row longer than one real token plus its drafts is a prefill row and commits atrow_len - num_draft_tokens. -
selective_scan: Selective scan kernel implementations for Mamba SSM prefill and decode. -
selective_scan_ops: Selective scan operation registrations for Mamba SSM. -
varlen_causal_conv1d: Causal Conv1D with variable length sequence support (vLLM interface).