Practical overview
When it fits
Use Simplemamba when you want documented Python examples for incorporating a MambaBlock or trying an SSM sequence model in a PyTorch project.
Who it is for
- Python developers incorporating a MambaBlock into a PyTorch model.
- Machine-learning practitioners prototyping state-space sequence modeling.
- Developers exploring a small language-modeling experiment with token-index inputs and per-position vocabulary logits.
Documented uses
- Instantiate and call a MambaBlock with configured dimensions and channel parameters.
- Create an SSM model by specifying vocabulary, embedding and state dimensions, and layer count.
- Pass a batch of token-index sequences to the SSM and inspect vocabulary-sized logits.
Requirements & limits
The README documents installation with pip install simple-mamba. The repository states an MIT license.
- The README demonstrates both a standalone MambaBlock call and an SSM sequence-model call, so choose according to whether you need a component or a token-sequence example.
- The SSM example configures vocabulary size, embedding dimension, state dimension and number of layers.
- Examples show instantiation and forward calls; they do not provide a documented training or evaluation workflow.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run the documented MambaBlock example
Instantiate a MambaBlock and pass it a sample PyTorch tensor.
Before you start
- Python environment with PyTorch available.
- Install the package with
pip install simple-mamba. - Use the documented parameter values: dim 512, hidden_dim 128, heads 8, in_channels 3, out_channels 3, and kernel_size 3.
Steps
Install SimpleMamba with the command below.
pip install simple-mambaImport
torchandMambaBlockfromsimple_mamba.Create a
MambaBlockusing the documented parameter values and createx = torch.randn(1, dim, dim).Call
output = mamba_block(x)and printoutput.shape.
Expected outcome
The example passes the sample tensor through the block and prints the output shape.
Guide limitations
- The README does not state the output shape value or provide a successful test result.
- The example does not specify additional environment or version requirements.
Run the documented SSM sequence example
Instantiate the SSM class, pass it a batch of token-index sequences, and inspect the logits shape.
Before you start
- Python environment with PyTorch available.
- Install the package with
pip install simple-mamba. - Use the documented values: vocab_size 10000, embed_dim 256, state_dim 512, and num_layers 2.
Steps
Install SimpleMamba with the command below.
pip install simple-mambaImport
torchandSSMfromsimple_mamba, then instantiateSSM(vocab_size, embed_dim, state_dim, num_layers)with the documented values.Create
input_seqwithtorch.randint(0, vocab_size, (32, 10)).Call
logits = model(input_seq)and printlogits.shape.
Expected outcome
The example expects logits shaped `[32, 10, vocab_size]`.
Guide limitations
- The expected shape is stated in the README but no successful test result is provided.
- The example does not specify additional environment or version requirements.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- kyegomez/SimpleMamba · Official homepage title · retained in its source language

