Gen Ecosystem

Gen is a platform for probabilistic modeling and inference. Gen includes a set of built-in languages for defining probabilistic models and a standard library for defining probabilistic inference algorithms, but is designed to be extended with an open-ended set of more specialized modeling languages and inference libraries.

Core packages


The main Gen package. Contains the core abstract data types for models and traces. Also includes general-purpose modeling languages and a standard inference library.


Gen modeling language that wraps PyTorch computation graphs.


Gen modeling language that wraps TensorFlow computation graphs.


Enables the use of any of Flux’s optimizers for parameter learning in generative functions from Gen’s static or dynamic modeling languages.


Building blocks for basic and advanced particle filtering.


Building blocks for modular probabilistic inference using pseudo-marginal Monte Carlo algorithms.


Compile portions of traces into factor graphs and use variable elimination on them.

Contributed packages


Domain-specific modeling library for fast inference in hidden Markov models.


Components for building generative models of the motion of an agent moving around a 2D environment.