FlashSpeculativeMamba is a research-oriented implementation of speculative decoding with a fast draft model and a verifier/target model.
FlashSpeculativeMamba/
|-- src/
| |-- __init__.py
| |-- speculative_engine.py
| |-- draft_model.py
| |-- target_model.py
| |-- mamba_state_cache.py
| |-- target_verifier.py
|-- tests/
| |-- test_engine.py
|-- scripts/
| |-- check_cuda.py
|-- benchmark.py
|-- demo.py
|-- requirements.txt
|-- .gitignore
|-- README.md
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtpython demo.py
python benchmark.py
python -m pytest tests/test_engine.py -v
python scripts/check_cuda.pybenchmark.pyis the research evaluation loop (formerlymain.py).demo.pyis the project demo entrypoint (formerlyriddima/run_demo.py).src/mamba_state_cache.pyandsrc/target_verifier.pypreserve teammate modules with clearer names.