vllm.model_executor.layers.mamba.abstract
MambaBase ¶
Bases: AttentionLayerBase
Base class for Mamba-like layers which support the v1 engine. Inherit from this class if you implement a custom layer.
Source code in vllm/model_executor/layers/mamba/abstract.py
get_attn_backend abstractmethod
¶
get_attn_backend() -> type[AttentionBackend]
get_state_shape abstractmethod
¶
Defines the shape of the state. For mamba layers this is usually a (conv_state, ssm_state) tuple. In this case, returns (conv_state_shape, ssm_state_shape).