Mamba is a state-space model architecture designed for efficient sequence modeling, offering linear-time inference and parallelizable training. Currently at version 2.3.1, it requires Python >=3.9 and is under active development with frequent releases focused on ROCm and CUDA compatibility.
pip install mamba-ssmVerified import paths — ran on the pinned version, not inferred.
Instantiate a Mamba model and run a forward pass on GPU with float16 precision.
Upgrade PyTorch to 2.0+ and ensure CUDA toolkit 11.8+ is available.
Install causal-conv1d from the same source (PyPI with matching CUDA version) or build from source using the same PyTorch build.
Remove the 'pscan' argument or set it to False (default).
Ensure input shape is (B, L, D). Use x = x.transpose(0,1) if you have (L, B, D).
Avoid torch.compile with Mamba layers, or test thoroughly.