4 releases
0.2.3 | Mar 5, 2024 |
---|---|
0.2.2 | Jan 18, 2024 |
0.2.1 | Jan 12, 2024 |
0.2.0 | Aug 19, 2023 |
#343 in Science
106 downloads per month
58KB
1K
SLoC
gen-rs
This is evolving software. Expect breaking API changes.
gen-rs is an experimental crate for probabilistic programming in Rust. gen-rs was inspired by GenTL, but with Rust-native constructs.
It approximately* implements the Generative Function Interface [GFI] as specified in the Gen.jl whitepaper and Marco Cusumano-Towner's thesis. It provides several kinds of inference procedures built on this interface.
Modeling
- Dynamically-typed
TrieFn
DSL - Unfold Kernel Combinator
- Example model implementations
Inference Procedures
- Importance Sampling
- Proposal-based MCMC
- Particle Filtering
Generate visualizations to visualizations
with:
python -m venv venv && source venv/bin/activate && pip install matplotlib
cargo test && python visualization/visualizer.py
Disclaimer
(*) gen-rs
does not exactly implement the GFI. More precisely, gen-rs
does not implement retdiff or choice gradients.
Dependencies
~6–8.5MB
~155K SLoC