[Misc] Replace mamba_type string literals with MambaAttentionBackendEnum (#41188)

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
wangxiyuan
2026-05-11 03:59:36 +00:00
committed by GitHub
parent 7f95e66a11
commit 5536fc0c01
18 changed files with 64 additions and 58 deletions
@@ -64,6 +64,7 @@ from vllm.model_executor.models.bailing_moe import BailingMLP
from vllm.sequence import IntermediateTensors
from vllm.v1.attention.backend import AttentionMetadata
from vllm.v1.attention.backends.linear_attn import LinearAttentionMetadata
from vllm.v1.attention.backends.registry import MambaAttentionBackendEnum
from .interfaces import HasInnerState, IsHybrid, SupportsPP
from .utils import (
@@ -444,8 +445,8 @@ class BailingMoELinearAttention(PluggableLayer, MambaBase):
# --8<-- [end:bailing_moe_linear_attention]
@property
def mamba_type(self) -> str:
return "linear_attention"
def mamba_type(self) -> MambaAttentionBackendEnum:
return MambaAttentionBackendEnum.LINEAR
def get_state_shape(self) -> tuple[tuple[int, ...], ...]:
"""Return state shape for linear attention cache.