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

Velocity · 7d
+3.3
★ / day
Trend
→steady
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.