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
  abstractmethod  ¶
 get_attn_backend() -> type[AttentionBackend]
 
 get_kv_cache_spec(
    vllm_config: VllmConfig,
) -> KVCacheSpec | None
Source code in vllm/model_executor/layers/mamba/abstract.py
  abstractmethod  ¶
    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).