Skip to content

vllm.config.mamba

Classes:

  • MambaBackendEnum –

    Enumeration of supported Mamba SSU (selective state update) backends.

  • MambaConfig –

    Configuration for Mamba SSM backends.

MambaBackendEnum

Bases: Enum

Enumeration of supported Mamba SSU (selective state update) backends.

MambaConfig

Configuration for Mamba SSM backends.

Methods:

Attributes:

backend = MambaBackendEnum.TRITON class-attribute instance-attribute

Mamba SSU backend to use.

enable_stochastic_rounding = False class-attribute instance-attribute

Enable stochastic rounding when writing SSM state to fp16 cache. Uses random bits to unbias the rounding error, which can improve numerical stability for long sequences. The Triton backend requires compute capability 10.0 on CUDA or gfx950 on ROCm.

prefill_backend = MambaBackendEnum.TRITON class-attribute instance-attribute

Kernel backend for the SSD scan of Mamba2 prefills. "flashinfer" runs FlashInfer's fused SSD scan (SM100/SM103 only); prefills that store Mamba checkpoints always use "triton".

ssu_algorithm = None class-attribute instance-attribute

Selective state update algorithm to use with the FlashInfer backend. None defaults to FlashInfer's "auto" algorithm. Forced algorithms must be supported by FlashInfer for the active GPU, state dtype, and decoding mode.

stochastic_rounding_philox_rounds = 0 class-attribute instance-attribute

Number of Philox PRNG rounds for stochastic rounding random number generation. 0 uses the Triton default. Higher values improve randomness quality at the cost of compute.

validate_backend_before(value) classmethod

Enable parsing of the backend enum fields from strings.

_MambaBackendEnumMeta

Bases: EnumMeta

Metaclass for MambaBackendEnum to provide better error messages.