You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make from_pretrained work for all Mamba models and rewrite README
Patch from_pretrained to auto-inject mamba2 ssm_cfg defaults, disable
fused_add_norm (no Triton on macOS), and load with strict=False for
missing norm biases. README now mirrors diffusers: pip install + a
Python quickstart that works without git clone or download scripts.
Remove noisy print on import.
Training and inference of Mamba 1 & 2 on Apple Silicon with MPS acceleration. Works without CUDA/Triton. Supports CLI, Python API, and interactive demos.
11
+
Training and inference of Mamba 1 & 2 on Apple Silicon with MPS acceleration. Works without CUDA/Triton.
12
12
13
13
## Installation
14
14
15
15
```bash
16
16
pip install mamba-ssm-macos
17
17
```
18
18
19
-
Or install from source:
19
+
Prerequisites: macOS 12.3+ with Apple Silicon, Python 3.10+, 8GB+ RAM recommended.
python -m examples.02_text_generation --interactive # Text generation
69
+
python -m examples.03_training # Training
97
70
```
98
71
99
72
## Troubleshooting
100
73
101
-
**"Model files not found"** — Run `make download-models` or `python -m scripts.download_models mamba1|mamba2`.
74
+
**"MPS not available"** — Check with `python -c "import torch; print(torch.backends.mps.is_available())"`. The library falls back to CPU automatically.
102
75
103
-
**"MPS not available"** — Check with `python -c "import torch; print(torch.backends.mps.is_available())"`. Falls back to CPU automatically.
76
+
**Slow first run** — Initial `from_pretrained` downloads ~500MB of weights from Hugging Face Hub. Subsequent runs use the local cache.
104
77
105
-
**Import errors** — Use module syntax: `python -m examples.02_text_generation`.
Available `make` targets: `test`, `test-unit`, `test-integration`, `test-quick`, `format`, `format-check`, `clean`. See the [Makefile](Makefile) for details.
106
88
107
89
## Citation
108
90
@@ -141,19 +123,12 @@ Also available via GitHub's "Cite this repository" button ([CITATION.cff](CITATI
141
123
## References
142
124
143
125
-[state-spaces/mamba](https://github.com/state-spaces/mamba) — Original implementation
144
-
-[state-spaces/mamba1-130m](https://huggingface.co/state-spaces/mamba1-130m) — Mamba 1 130M Pre-trained model
145
-
-[state-spaces/mamba2-130m](https://huggingface.co/state-spaces/mamba2-130m) — Mamba 2 130M Pre-trained model
126
+
-[state-spaces/mamba1-130m](https://huggingface.co/state-spaces/mamba-130m) — Mamba 1 130M pre-trained model
127
+
-[state-spaces/mamba2-130m](https://huggingface.co/state-spaces/mamba2-130m) — Mamba 2 130M pre-trained model
146
128
147
129
## Contributing
148
130
149
-
Contributions are welcome — bug fixes, performance improvements, docs, and new features. Open an issue or submit a PR.
Feel free to [open an issue](https://github.com/purohit10saurabh/mamba-ssm-macos/issues) or [submit a PR](https://github.com/purohit10saurabh/mamba-ssm-macos/pulls). See [Development](#development) for the local setup.
0 commit comments