- Purpose: Vectorized probabilistic programming with generative functions and programmable inference in JAX.
- Formal foundations: A mechanized Lean model proves product density preservation and fundamental vectorization for finite models under explicit primitive conformance certificates. Concrete execution maps vectorized generative primitives to XLA kernels, separating denotational density semantics from machine array compilation.
- POPL 2026 artifact: v1.0.10
git clone https://github.com/a-tiny-project/genjax.git
cd genjax
pixi install
pixi run test-fast
pixi run paper-figures
pixi run paper-figures-gpufrom genjax import gen, normal
@gen
def model():
return normal(0.0, 1.0) @ "x"
trace = model.simulate()
choices = trace.get_choices()- Generative functions expose
simulate,generate,assess, andupdate. vmapandmodular_vmaplift model and inference structure over explicit array axes.- Inspect all Pixi tasks in pyproject.toml.
| Case | Figures | Command |
|---|---|---|
| Fair coin | 16a | pixi run paper-faircoin-gen |
| Curve fitting | 4–6 | pixi run paper-curvefit-gen |
| Multi-framework benchmark | 16b | pixi run paper-perfbench |
| Game of Life | 18 | pixi run assets && pixi run -e gol gol-paper |
| Localization | 19 | pixi run paper-localization-gen |
| AIR estimators | PLDI 2024 port | pixi run air-compare |
- Add
--mode cudatopaper-perfbenchfor its CUDA pipeline. - CPU and GPU execute the same models but have different scaling curves.
- Figure 19 and paper-scale curve fitting require CUDA-like throughput to match the published timing/ESS panels.
- Gen.jl benchmark lanes require Julia 1.10 or newer.
- Generated figures are saved in
figs/. Perfbench outputs to separate CPU and CUDA directories.
- Public package
- Generative-function core
- Distributions
- Probabilistic vectorization
- Inference
- ADEV
- Tests
- Examples
- Performance benchmark
- Citation metadata
- Package references
- Probabilistic Programming with Vectorized Programmable Inference
- Artifact DOI
- Gen: programmable inference
- ADEV
- Programmable variational inference
Apache-2.0. See LICENSE.
