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.
Source code in vllm/config/mamba.py
MambaConfig
¶
Configuration for Mamba SSM backends.
Methods:
-
validate_backend_before–Enable parsing of the backend enum fields from strings.
Attributes:
-
backend(MambaBackendEnum) –Mamba SSU backend to use.
-
enable_stochastic_rounding(bool) –Enable stochastic rounding when writing SSM state to fp16 cache.
-
prefill_backend(MambaBackendEnum) –Kernel backend for the SSD scan of Mamba2 prefills. "flashinfer" runs
-
ssu_algorithm(MambaSSUAlgorithm | None) –Selective state update algorithm to use with the FlashInfer backend.
-
stochastic_rounding_philox_rounds(int) –Number of Philox PRNG rounds for stochastic rounding random number
Source code in vllm/config/mamba.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
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.
Source code in vllm/config/mamba.py
_MambaBackendEnumMeta
¶
Bases: EnumMeta
Metaclass for MambaBackendEnum to provide better error messages.