ONNX Support for Stan

Hey all,

Today myself, Andreas Fehlner, and Adam Pocock made a presentation to the ONNX steering committee to propose new working groups around ONNX support for Bayesian Models from various frameworks. The working groups are not approved yet but we would like to gauge community feedback from this type of work and also do people want more ONNX support for Bayesian Models and Inference from frameworks like Stan, PyMC, Pyro, Numpyro, Tensorflow Probability, and many others. Please drop a comment if you like around what you want from ONNX in terms of support for these frameworks and how can ONNX be more useful in deployment of these models.

Thanks again and any feedback is welcome!

-Brian Parbhu
Probabilistic models and ONNX 12-03-2025.pdf (137.7 KB)

3 Likes

This sounds interesting, though please excuse me as I am confused about the proposal. To be sure, are you proposing:

  • ONNX implements all the algorithms (HMC, NUTS, etc)
  • Users write models in their favorite PPL and then export to ONNX?

Thanks,

Andrew

1 Like

Hi @andrewfowlie ,

So the idea is that you would use whatever framework you would like. In this case Stan, and you would convert your model to the onnx format through a converter we would supply. Though to get to that point we would need several building blocks such as modules dealing with operators, bijectors, distributions, and inference. Those would need an internal representation in ONNX so that’s what we’re proposing to build out as well.

Love the response here keep it coming!

Also here’s a link about the ONNX framework for those unfamiliar with it.

and their GitHub org

2 Likes

Hey all,

These are the meeting notes from the presentation.

1 Like