# Probabilistic Programming

**URL:** https://discourse.julialang.org/c/domain/probprog/48.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [About the Probabilistic Programming category](https://discourse.julialang.org/t/about-the-probabilistic-programming-category/26658)

<div class="topic-metadata">

**Author:** [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Replies:** 0

</div>

Discussion on Probabilistic programming in Julia. Discussions and ideas about bringing inference algorithms and theory from statistics combined with formal semantics, compilers, and other tools from programming language…

---

## [JuliaBayes and Turing Ecosystem](https://discourse.julialang.org/t/juliabayes-and-turing-ecosystem/139236)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 8\
**Last updated:** [September 10, 2026, 1:35pm UTC](https://discourse.julialang.org/t/juliabayes-and-turing-ecosystem/139236 "2026-09-10T13:35:39Z")

</div>

Hi, I’m just curious what’s the goals of the JuliaBayes · GitHub group, and it’s relationship to the existing The Turing Language · GitHub ecosystem (or other probabilistic programming efforts in Julia; I’m only aware of…

---

## [Exporting TuringGLM code](https://discourse.julialang.org/t/exporting-turingglm-code/110738)

<div class="topic-metadata">

**Author:** [@Sam\_P](https://discourse.julialang.org/u/Sam_P)\
**Replies:** 2\
**Last updated:** [August 15, 2026, 7:43am UTC](https://discourse.julialang.org/t/exporting-turingglm-code/110738 "2026-08-15T07:43:48Z")

</div>

Hi all - R and cmdstan user here trying his hands on Julia and Turing. Came across TuringGLM and I like its smooth interface akin to what brms is to RStan. I do want to learn the raw Turing code though, and was wonderi…

---

## [Analysis on result of \`AbstractMCMC.sample\`](https://discourse.julialang.org/t/analysis-on-result-of-abstractmcmc-sample/138793)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 0\
**Last updated:** [August 13, 2026, 9:43pm UTC](https://discourse.julialang.org/t/analysis-on-result-of-abstractmcmc-sample/138793 "2026-08-13T21:43:17Z")

</div>

Hi, I have 2 questions. Say I’m using the MALA sampler from AdvancedMH.jl, I think the following is the easiest way to compute the acceptance %, is that correct or is there some other method? Second question is regarding…

---

## [API for FB Prophet model](https://discourse.julialang.org/t/api-for-fb-prophet-model/74138)

<div class="topic-metadata">

**Author:** [@mobar](https://discourse.julialang.org/u/mobar)\
**Replies:** 11\
**Last updated:** [May 6, 2026, 2:11am UTC](https://discourse.julialang.org/t/api-for-fb-prophet-model/74138 "2026-05-06T02:11:52Z")

</div>

Has anyone yet created an eay-to-use API in Julia for Facebook’s prophet model with a basic “fit” and “predict” functionality? (Quick Start | Prophet) I’m simply asking because there’s a good chance someone also has al…

---

## [Compare two Turing models with LOO: SE is NaN](https://discourse.julialang.org/t/compare-two-turing-models-with-loo-se-is-nan/102269)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 7\
**Last updated:** [April 19, 2026, 1:17am UTC](https://discourse.julialang.org/t/compare-two-turing-models-with-loo-se-is-nan/102269 "2026-04-19T01:17:20Z")

</div>

I am trying to compare two SequentialSamplingModels with loo using ParetoSmooth.jl, but I think I am doing something wrong: using Turing using SequentialSamplingModels using Random using Distributions using DataFrames u…

---

## [Call for Contributors: Probabilistic Programming & Bayesian Inference in ONNX](https://discourse.julialang.org/t/call-for-contributors-probabilistic-programming-bayesian-inference-in-onnx/135380)

<div class="topic-metadata">

**Author:** [@bparbhu](https://discourse.julialang.org/u/bparbhu)\
**Replies:** 5\
**Last updated:** [March 29, 2026, 2:13pm UTC](https://discourse.julialang.org/t/call-for-contributors-probabilistic-programming-bayesian-inference-in-onnx/135380 "2026-03-29T14:13:37Z")

</div>

Hi everyone, I wanted to share an initiative that’s getting underway within the ONNX ecosystem and invite input and participation from the Julia probabilistic programming community—particularly folks working with Turing…

---

## [Hidden Markov Model with fixed parameters](https://discourse.julialang.org/t/hidden-markov-model-with-fixed-parameters/126710)

<div class="topic-metadata">

**Author:** [@simonsteiger](https://discourse.julialang.org/u/simonsteiger)\
**Replies:** 13\
**Last updated:** [March 7, 2026, 6:58am UTC](https://discourse.julialang.org/t/hidden-markov-model-with-fixed-parameters/126710 "2026-03-07T06:58:40Z")

</div>

I am trying to model a sequence of behaviours with two end points as a hidden markov model. To do this, I tried fixing some parameters in the transition and emission matrices, but I ran into the following error: MethodE…

---

## [Performance of Pigeons.jl's AutoMALA on correlated targets](https://discourse.julialang.org/t/performance-of-pigeons-jls-automala-on-correlated-targets/135976)

<div class="topic-metadata">

**Author:** [@ysfoo](https://discourse.julialang.org/u/ysfoo)\
**Replies:** 1\
**Last updated:** [March 3, 2026, 8:13pm UTC](https://discourse.julialang.org/t/performance-of-pigeons-jls-automala-on-correlated-targets/135976 "2026-03-03T20:13:27Z")

</div>

I’ve seen Pigeons.jl advocated a few times here as a promising tool for parallel tempering. The package makes use of AutoMALA as a general-purpose sampler, instead of the popular NUTS sampler. The AutoMALA paper claims t…

---

## [What is the canon way to randomly draw one (or more) parameter sets from a sampled distribution?](https://discourse.julialang.org/t/what-is-the-canon-way-to-randomly-draw-one-or-more-parameter-sets-from-a-sampled-distribution/135935)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 11\
**Last updated:** [March 2, 2026, 5:48pm UTC](https://discourse.julialang.org/t/what-is-the-canon-way-to-randomly-draw-one-or-more-parameter-sets-from-a-sampled-distribution/135935 "2026-03-02T17:48:15Z")

</div>

Using turing I have done n\_steps = 1000 n\_chains = 4 chain = sample(model, NUTS(), MCMCThreads(), n\_steps, n\_chains) I can plot the output using plot(chain) However, if I want to draw a random parameter set to do …

---

## [Turing constrain on observations of deterministic function](https://discourse.julialang.org/t/turing-constrain-on-observations-of-deterministic-function/135718)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 3\
**Last updated:** [February 20, 2026, 4:00am UTC](https://discourse.julialang.org/t/turing-constrain-on-observations-of-deterministic-function/135718 "2026-02-20T04:00:05Z")

</div>

I have the following model function f(x) x^2 end @model function simplemodel() x ~ Normal(5, 1) y := f(x) return y end sample(simplemodel(), NUTS(), 50) |\> histogram As can be seen it involves the de…

---

## [\`data\[i, "γ (N/m)"\] ~ Normal(γ\_pred, σ)\` disallowed in Turing.jl in v0.42? how to fix?](https://discourse.julialang.org/t/data-i-n-m-normal-pred-disallowed-in-turing-jl-in-v0-42-how-to-fix/135438)

<div class="topic-metadata">

**Author:** [@Cory\_Simon](https://discourse.julialang.org/u/Cory_Simon)\
**Replies:** 2\
**Last updated:** [February 9, 2026, 7:51pm UTC](https://discourse.julialang.org/t/data-i-n-m-normal-pred-disallowed-in-turing-jl-in-v0-42-how-to-fix/135438 "2026-02-09T19:51:38Z")

</div>

a Turing.jl breaking changes question: I updated ↑ Turing v0.41.1 ⇒ v0.42.8, then my code broke. is data\[i, "γ (N/m)"\] ~ Normal(γ\_pred, σ) disallowed now? see code and error below. I looked for breaking changes in 0.4…

---

## [GPU support for Turing modeling with system of ODEs](https://discourse.julialang.org/t/gpu-support-for-turing-modeling-with-system-of-odes/77410)

<div class="topic-metadata">

**Author:** [@vembha](https://discourse.julialang.org/u/vembha)\
**Replies:** 8\
**Last updated:** [January 5, 2026, 7:38am UTC](https://discourse.julialang.org/t/gpu-support-for-turing-modeling-with-system-of-odes/77410 "2026-01-05T07:38:43Z")

</div>

Hello, I am trying to perform Bayesian analysis on a Turing model with an ecological ODE system embedded; consider it to be a complex variant of a Lotka-Volterra model. As of now, the code is running perfectly fine with…

---

## [Parallelism within Turing.jl model](https://discourse.julialang.org/t/parallelism-within-turing-jl-model/54064)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 10\
**Last updated:** [November 25, 2025, 2:08pm UTC](https://discourse.julialang.org/t/parallelism-within-turing-jl-model/54064 "2025-11-25T14:08:40Z")

</div>

Hi there, just wondering how safe it is to use Threads.@threads for loops within turing models e.g. @model function my\_func(Y) alpha ~ Normal(0,1) sigma ~ Normal(0,1) Threads.@threads for i in 1:size(Y)\[2…

---

## [NUTS mass matrix estimation and num\_warmup](https://discourse.julialang.org/t/nuts-mass-matrix-estimation-and-num-warmup/134046)

<div class="topic-metadata">

**Author:** [@contejuz](https://discourse.julialang.org/u/contejuz)\
**Replies:** 7\
**Last updated:** [November 24, 2025, 8:12pm UTC](https://discourse.julialang.org/t/nuts-mass-matrix-estimation-and-num-warmup/134046 "2025-11-24T20:12:47Z")

</div>

I have a distribution with a somewhat wide range of parameters in a hierarchical model. Some range are in \[0,1\], while another is in \[0,60\] roughly, with most mass around 20-30. a\_0 ~ Beta(8,2) b\_0 ~ truncated(Normal…

---

## [Difficulty using Submodels in Turing](https://discourse.julialang.org/t/difficulty-using-submodels-in-turing/133634)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 4\
**Last updated:** [November 4, 2025, 2:48pm UTC](https://discourse.julialang.org/t/difficulty-using-submodels-in-turing/133634 "2025-11-04T14:48:33Z")

</div>

Hi, I am trying to use Submodels as described in Submodels – Turing.jl. However I cannot figure out how to get it to work. I posted a deliberately simplified reproducable example below, and the error I was getting below …

---

## [Any solution for float 32 required by lux models embeded in Turing.jl](https://discourse.julialang.org/t/any-solution-for-float-32-required-by-lux-models-embeded-in-turing-jl/133202)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 3\
**Last updated:** [October 17, 2025, 11:25am UTC](https://discourse.julialang.org/t/any-solution-for-float-32-required-by-lux-models-embeded-in-turing-jl/133202 "2025-10-17T11:25:44Z")

</div>

Hi I have trained Variational Autoencoder from Lux.jl embeded inside a Turing.jl model. But I am unable to convert a latent variable to float32 to pass it through Lux.jl model to get its ouput. I saw a post here (Issue w…

---

## [Default sampler for mixed continuous/discrete parameters in Turing.jl](https://discourse.julialang.org/t/default-sampler-for-mixed-continuous-discrete-parameters-in-turing-jl/132874)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 2\
**Last updated:** [October 15, 2025, 7:46am UTC](https://discourse.julialang.org/t/default-sampler-for-mixed-continuous-discrete-parameters-in-turing-jl/132874 "2025-10-15T07:46:13Z")

</div>

I’m fitting a Turing.jl model with continuous and discrete variables. Using MH() works out of the box. What’s going on under the hood here in terms of samplers and proposals? Any tips on how to tune would be great. My m…

---

## [Fitting multiple datasets simultaneously](https://discourse.julialang.org/t/fitting-multiple-datasets-simultaneously/132176)

<div class="topic-metadata">

**Author:** [@soniamitchell](https://discourse.julialang.org/u/soniamitchell)\
**Replies:** 9\
**Last updated:** [September 25, 2025, 1:10pm UTC](https://discourse.julialang.org/t/fitting-multiple-datasets-simultaneously/132176 "2025-09-25T13:10:28Z")

</div>

I want to fit a model to multiple datasets simultaneously, with some fitted parameters being shared across datasets. Is it possible to do this using Turing.jl?

---

## [How to mimick a Discrete Bayes Net in Turing.jl?](https://discourse.julialang.org/t/how-to-mimick-a-discrete-bayes-net-in-turing-jl/130319)

<div class="topic-metadata">

**Author:** [@nicolasg](https://discourse.julialang.org/u/nicolasg)\
**Replies:** 5\
**Last updated:** [September 23, 2025, 1:16pm UTC](https://discourse.julialang.org/t/how-to-mimick-a-discrete-bayes-net-in-turing-jl/130319 "2025-09-23T13:16:40Z")

</div>

Hi, I’ve been using Turing.jl for various purposes, and recently I thought it might be easy to mimick inference from a basic discrete bayesian network like I could do with BayesNets.jl like this for example: bn = Discr…

---

## [Compute Deviance Information Criterion for a Bayesian Model](https://discourse.julialang.org/t/compute-deviance-information-criterion-for-a-bayesian-model/132195)

<div class="topic-metadata">

**Author:** [@dhruva-ahuja](https://discourse.julialang.org/u/dhruva-ahuja)\
**Replies:** 1\
**Last updated:** [September 9, 2025, 9:05am UTC](https://discourse.julialang.org/t/compute-deviance-information-criterion-for-a-bayesian-model/132195 "2025-09-09T09:05:46Z")

</div>

Hello, I am struggling to compute Deviance Information Criterion (DIC) in Julia as Turing/MCMCDiagnosticTools do not have an implementation of DIC as in R dic.samples(mod2, n.iter=1e3). Backdrop: I am enrolled in a cou…

---

## [What's the difference between Gen and Turing for probabilistic programming?](https://discourse.julialang.org/t/whats-the-difference-between-gen-and-turing-for-probabilistic-programming/36624)

<div class="topic-metadata">

**Author:** [@sivakon](https://discourse.julialang.org/u/sivakon)\
**Replies:** 7\
**Last updated:** [September 3, 2025, 8:58am UTC](https://discourse.julialang.org/t/whats-the-difference-between-gen-and-turing-for-probabilistic-programming/36624 "2025-09-03T08:58:09Z")

</div>

Asked question in #probprog channel on Slack.

---

## [Restart an existing MCMC chain at the same point it was paused](https://discourse.julialang.org/t/restart-an-existing-mcmc-chain-at-the-same-point-it-was-paused/131901)

<div class="topic-metadata">

**Author:** [@ghadgeabhi](https://discourse.julialang.org/u/ghadgeabhi)\
**Replies:** 2\
**Last updated:** [August 29, 2025, 5:44am UTC](https://discourse.julialang.org/t/restart-an-existing-mcmc-chain-at-the-same-point-it-was-paused/131901 "2025-08-29T05:44:12Z")

</div>

In my workflow, I want to be able look at the metrics of a MCMC chain, so I want run it for a certain amount of iteration. I want to then be able to continue the same chain for more iterations. How could this be done wi…

---

## [How to handle missing values in Turing.jl](https://discourse.julialang.org/t/how-to-handle-missing-values-in-turing-jl/131395)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 1\
**Last updated:** [August 6, 2025, 6:01pm UTC](https://discourse.julialang.org/t/how-to-handle-missing-values-in-turing-jl/131395 "2025-08-06T18:01:33Z")

</div>

I am attempting a problem where my observed variable (tested\_positive) has missing values. I am wondering how to attempt such a problem using Turing.jl. In my cases I have popn covariates which have no missing values, t…

---

## [Deserialization of Turing model fails in Quarto document](https://discourse.julialang.org/t/deserialization-of-turing-model-fails-in-quarto-document/130699)

<div class="topic-metadata">

**Author:** [@khoffie](https://discourse.julialang.org/u/khoffie)\
**Replies:** 5\
**Last updated:** [July 15, 2025, 1:48pm UTC](https://discourse.julialang.org/t/deserialization-of-turing-model-fails-in-quarto-document/130699 "2025-07-15T13:48:41Z")

</div>

I have several results from an optimization serialized to disk. They are all NamedTuples result = (mdl = A Turing Model, chn = A Chains object) Now I want to return predictions from a model in my test.qmd file: --- titl…

---

## [How do I extract the maximum likelihood point estimates from a Turing output chain](https://discourse.julialang.org/t/how-do-i-extract-the-maximum-likelihood-point-estimates-from-a-turing-output-chain/130537)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 9\
**Last updated:** [July 8, 2025, 9:20am UTC](https://discourse.julialang.org/t/how-do-i-extract-the-maximum-likelihood-point-estimates-from-a-turing-output-chain/130537 "2025-07-08T09:20:54Z")

</div>

I have a Turing output computed something like model = make\_model(data, ps) chain = sample(model, NUTS(), MCMCSerial(), n\_steps, n\_chains; progress = false); plot(chain) How do I extract the maximum likelihood point…

---

## [Efficient vectorization in Turing.jl](https://discourse.julialang.org/t/efficient-vectorization-in-turing-jl/130390)

<div class="topic-metadata">

**Author:** [@contejuz](https://discourse.julialang.org/u/contejuz)\
**Replies:** 1\
**Last updated:** [July 3, 2025, 3:25pm UTC](https://discourse.julialang.org/t/efficient-vectorization-in-turing-jl/130390 "2025-07-03T15:25:38Z")

</div>

I have a fairly simple hierarchical model where I have 2 population parameters a,b. b is also an individual level parameters such that the b\_i are sampled from a distribution parametrized by b. a and b\_i govern the shape…

---

## [What is the intended use for \`Turing.returned(model)\`?](https://discourse.julialang.org/t/what-is-the-intended-use-for-turing-returned-model/130105)

<div class="topic-metadata">

**Author:** [@lunafazio](https://discourse.julialang.org/u/lunafazio)\
**Replies:** 4\
**Last updated:** [June 30, 2025, 7:16am UTC](https://discourse.julialang.org/t/what-is-the-intended-use-for-turing-returned-model/130105 "2025-06-30T07:16:24Z")

</div>

There are no examples in the documentation, but based on its description, Return a model wrapper indicating that it is a model over its return-values. I assumed that this would allow me to do something like chain = …

---

## [Get Turing's model predictions after optimization](https://discourse.julialang.org/t/get-turings-model-predictions-after-optimization/130275)

<div class="topic-metadata">

**Author:** [@khoffie](https://discourse.julialang.org/u/khoffie)\
**Replies:** 6\
**Last updated:** [June 29, 2025, 7:01pm UTC](https://discourse.julialang.org/t/get-turings-model-predictions-after-optimization/130275 "2025-06-29T19:01:03Z")

</div>

Hi, since Turing 0.35 generated\_quantities() is deprecated. So how do I now get my model’s predictions? Before 0.35 I did something like this function predict(mdl, mles) ## mdl is an instantiated Turing model pa…

---

## [Slow Turing.jl sampling compared to python pymc](https://discourse.julialang.org/t/slow-turing-jl-sampling-compared-to-python-pymc/130228)

<div class="topic-metadata">

**Author:** [@mahe](https://discourse.julialang.org/u/mahe)\
**Replies:** 7\
**Last updated:** [June 26, 2025, 2:59pm UTC](https://discourse.julialang.org/t/slow-turing-jl-sampling-compared-to-python-pymc/130228 "2025-06-26T14:59:02Z")

</div>

I have a spatial model on a (currently) 5x5 grid, for two variables (total size 3737). And 483 observations for one variables. In this simple setting, I want to work in full space (no space reduction), and model my syste…

[Next page](https://discourse.julialang.org/c/domain/probprog/48.md?page=1)
