← all repositories

johnma2006/mamba-minimal

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

3k stars Python Language ModelsML Frameworks
mamba-minimal
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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.