Files
candle/candle-examples/examples/mamba/README.md
Laurent Mazare 1e26d539d9 Improved mamba model optimized for inference (#1694)
* Sketch the mamba model for inference.

* Complete the forward pass.

* Add the mamba example.

* Optimize the selective-scan part.

* Fix a couple shape mismatches and get inference to work.

* Tweak the readmes.

* More readme tweaks.
2024-02-11 17:04:57 +01:00

671 B

candle-mamba: Mamba implementation

Candle implementation of Mamba [1] inference only. Mamba is an alternative to the transformer architecture. It leverages State Space Models (SSMs) with the goal of being computationally efficient on long sequences. The implementation is based on mamba.rs.

Compared to the mamba-minimal example, this version is far more efficient but would only work for inference.

Running the example

$ cargo run --example mamba-minimal --release -- --prompt "Mamba is the"