# ONNX Support for Stan

**URL:** <https://discourse.mc-stan.org/t/onnx-support-for-stan/40706>\
**Category:** General\
**Created:** [December 4, 2025, 2:02am UTC](https://discourse.mc-stan.org/t/onnx-support-for-stan/40706 "2025-12-04T02:02:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bparbhu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bparbhu/32/2722_2.png) [@bparbhu](https://discourse.mc-stan.org/u/bparbhu)\
**Post date:** [December 4, 2025, 2:02am UTC](https://discourse.mc-stan.org/t/onnx-support-for-stan/40706/1 "2025-12-04T02:02:15Z")

</div>

Hey all,

Today myself, [Andreas Fehlner](https://www.linkedin.com/in/andreas-fehlner-60499971/), and [Adam Pocock](https://www.linkedin.com/in/craigacp/) 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](https://discourse.mc-stan.org/uploads/short-url/ud49iaEQaSNnplZDlyJVlth4uN0.pdf) (137.7 KB)

---

<div class="post-metadata">

**Author:** ![andrewfowlie](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/andrewfowlie/32/20131_2.png) [@andrewfowlie](https://discourse.mc-stan.org/u/andrewfowlie)\
**Post date:** [December 4, 2025, 6:55am UTC](https://discourse.mc-stan.org/t/onnx-support-for-stan/40706/2 "2025-12-04T06:55:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bparbhu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bparbhu/32/2722_2.png) [@bparbhu](https://discourse.mc-stan.org/u/bparbhu)\
**Post date:** [December 4, 2025, 4:55pm UTC](https://discourse.mc-stan.org/t/onnx-support-for-stan/40706/3 "2025-12-04T16:55:20Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![bparbhu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bparbhu/32/2722_2.png) [@bparbhu](https://discourse.mc-stan.org/u/bparbhu)\
**Post date:** [December 4, 2025, 4:58pm UTC](https://discourse.mc-stan.org/t/onnx-support-for-stan/40706/4 "2025-12-04T16:58:21Z")

</div>

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

> **[ONNX | Home](https://onnx.ai/)**

and their GitHub org

> **[Open Neural Network Exchange](https://github.com/onnx)**
>
> ONNX is an open ecosystem for interoperable AI models. It's a community project: we welcome your contributions! - Open Neural Network Exchange

---

<div class="post-metadata">

**Author:** ![bparbhu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bparbhu/32/2722_2.png) [@bparbhu](https://discourse.mc-stan.org/u/bparbhu)\
**Post date:** [December 10, 2025, 3:09pm UTC](https://discourse.mc-stan.org/t/onnx-support-for-stan/40706/5 "2025-12-10T15:09:08Z")

</div>

Hey all,

These are the meeting notes from the presentation.

> <https://github.com/onnx/steering-committee/blob/main/meeting-notes/2025/20251203.md>
