Turing models are easy to read and write–models work the way you write them.

Specify complex models with discrete parameters and stochastic control flow easily.

Turing is modular, written fully in Julia and can be modified to suit your needs.

Turing's modelling syntax allows you to specify a model easily. Simple models can be expressed in the same way as complex, hierarchical models with stochastic control flow.

Get Started

$p(\sigma^2, \mu \mid x, y)$:

$\begin{aligned}
&\sigma^2 & &\sim & &\mathcal{I}\text{nverse}\mathcal{G}\text{amma}(2, 3) \\
&\mu & &\sim & &\mathcal{N}\text{ormal}(0, \sigma^2) \\
&x & &\sim & &\mathcal{N}\text{ormal}(0, \sigma^2) \\
&y & &\sim & &\mathcal{N}\text{ormal}(0, \sigma^2) \\
\end{aligned}$

```
@model function lingauss(x, y)
σ² ~ InverseGamma(2, 3)
μ ~ Normal(0, sqrt(σ²))
x ~ Normal(μ, sqrt(σ²))
y ~ Normal(μ, sqrt(σ²))
end
```

All news

Turing provides Hamiltonian Monte Carlo sampling for differentiable posterior distributions, Particle MCMC sampling for complex posterior distributions involving discrete variables and stochastic control flow, and Gibbs sampling which combines particle MCMC, HMC and many other MCMC algorithms.

Samplers

Turing supports Julia's Flux package for automatic differentiation. Combine Turing and Flux to construct probabilistic variants of traditional machine learning models.

Bayesian Neural Network Tutrial

Join the Turing community to contribute, learn and get your questions answered.

Report bugs, request features, discuss statistical applications/theory, and more.

Browse and join discussions on Turing.

Discuss advanced topics. Request access here.

Explore a rich ecosystem of libraries, tools, and more to support development.

Robust, modular and efficient implementation of advanced Hamiltonian Monte Carlo algorithms.

Go to AdvancedHMC

Automatic transformations for constrained random variables.

Go to Bijectors