johnma2006/mamba-minimal
A minimal, readable PyTorch implementation of the Mamba selective state space model architecture for sequence modeling.

Not currently ranked — collecting fresh signals.
star history
This repository provides a single-file PyTorch implementation of the Mamba SSM architecture that replicates the official implementation’s numerical output for both forward and backward passes. It prioritizes code readability and annotation over performance optimization. The implementation supports prompt completion generation when paired with a tokenizer from the Hugging Face transformers library.
Frequently asked
- What is johnma2006/mamba-minimal?
- A minimal, readable PyTorch implementation of the Mamba selective state space model architecture for sequence modeling.
- Is mamba-minimal open source?
- Yes — johnma2006/mamba-minimal is open source, released under the Apache-2.0 license.
- What language is mamba-minimal written in?
- johnma2006/mamba-minimal is primarily written in Python.
- How popular is mamba-minimal?
- johnma2006/mamba-minimal has 3k stars on GitHub.
- Where can I find mamba-minimal?
- johnma2006/mamba-minimal is on GitHub at https://github.com/johnma2006/mamba-minimal.