A PyMC model's log density compiled to WebAssembly and sampled by nuts-rs, in the page. Four ways in.
Source, the build step and the checks: github.com/habakan/pymcwasm
Write the model here → PyMC runs in the tab under Pyodide. Edit the model, compile it, sample it. Costs a Python runtime on first load — tens of seconds. A marimo notebook → marimo's Simpson's paradox example, three PyMC models sampled in the tab withmode="WASM".
A BART model here →
pymc-bart under Pyodide: bartrs's particle Gibbs on the trees and NUTS on
the noise, every log density compiled with mode="WASM".
Seven compiled beforehand →
No Python anywhere. Each model is a wasm module of a few tens of
kilobytes, checked against nutpie.
And one fitted rather than sampled.
Train a decoder here → A small neural decoder over 32 MNIST digits, written in PyMC and compiled beforehand, fit by ADVI in the tab in 14–22 seconds.