[v1][mamba] Added mamba_type into MambaSpec (#21715)

Signed-off-by: asafg <asafg@ai21.com>
Co-authored-by: asafg <asafg@ai21.com>
This commit is contained in:
Asaf Joseph Gardin
2025-07-28 08:15:55 +00:00
committed by GitHub
co-authored by asafg
parent 139a7f07bd
commit a6c050286a
6 changed files with 52 additions and 4 deletions
@@ -27,3 +27,8 @@ class MambaBase(ABC):
In this case, returns (conv_state_shape, ssm_state_shape).
"""
pass
@property
@abstractmethod
def mamba_type(self) -> str:
pass
@@ -732,6 +732,10 @@ class MambaMixer2(MambaBase, CustomOp):
conv_kernel=self.conv_kernel_size,
)
@property
def mamba_type(self) -> str:
return "mamba2"
def mamba_mixer2(
hidden_states: torch.Tensor,