An open-source stack for generative modeling and probabilistic inference.
Warning Gen.clj, the Clojure implementation of the Gen language, currently only supports a subset of Gen's features. For a complete implementation see Gen.jl. If you would like to get involved with Gen.clj's development please contact us.
- Gen automates the implementation details of probabilistic inference algorithms
- Gen allows users to flexibly navigate performance trade-offs
- Gen supports custom hybrid inference algorithms
- Users write custom inference algorithms without extending the compiler
- Efficient inference in models with stochastic structure
Gen.clj is currently only available as a git
dependency. To
install Gen.clj, add the following entry to your deps.edn
under the :deps
key:
io.github.inferenceql/gen.clj {:git/url "https://github.com/inferenceql/gen.clj"
:git/sha "3283de82c2b25870b530c22948ac3cdc1b6996d4"}
The project's interactive documentation was generated from
the notebooks in the
examples
directory using Nextjournal's Clerk. If you'd like to edit or play
with the documentation or demos, you'll need to install
Next, clone the repository:
git clone git@github.com:InferenceQL/gen.clj.git
cd gen.clj
Run this command in the cloned repository:
bb clerk-watch
This will open a browser window to http://localhost:7777
with the contents of
the "Introduction to Modeling in
Gen.clj"
notebook loaded. Any edits you make to examples/intro_to_modeling.clj
on your
filesystem will update this page, and editing any other file in examples
, like
examples/introduction.clj
, will load that file's namespace into the browser.
For more information on Clerk see the Book of Clerk and the Clerk repository.
Gen.jl was created by Marco Cusumano-Towner the MIT Probabilistic Computing Project, which is led by Vikash Mansinghka. Gen.jl has grown and is maintained through the help of a core research and engineering team that includes Alex Lew, Tan Zhi-Xuan, George Matheos, McCoy Becker, Feras Saad and Sam Ritchie, as well as a number of open-source contributors. Gen.jl was adapted to Clojure by Zane Shelby with help from Ulrich Schaechtle. The Gen architecture is described in Marco's PhD thesis.
If you use Gen in your research, please cite our PLDI paper:
Gen: A General-Purpose Probabilistic Programming System with Programmable Inference. Cusumano-Towner, M. F.; Saad, F. A.; Lew, A.; and Mansinghka, V. K. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ‘19). (pdf) (bibtex)
Distributed under the Apache 2.0 license. See LICENSE.