# Is it possible to implement custom inference in Turing?

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-implement-custom-inference-in-turing/48468>\
**Category:** Probabilistic Programming\
**Tags:** turing\
**Created:** [October 16, 2020, 1:27am UTC](https://discourse.julialang.org/t/is-it-possible-to-implement-custom-inference-in-turing/48468 "2020-10-16T01:27:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yarnton](https://avatars.discourse-cdn.com/v4/letter/y/ac91a4/32.png) [@yarnton](https://discourse.julialang.org/u/yarnton)\
**Post date:** [October 16, 2020, 1:27am UTC](https://discourse.julialang.org/t/is-it-possible-to-implement-custom-inference-in-turing/48468/1 "2020-10-16T01:27:46Z")

</div>

I’m new to Turing, but I have quite a lot of experience in probabilistic programming. Particularly with models that can be expressed as factor graphs (e.g. Infer NET or ForneyLab.jl).

Turing looks really neat. Is it reasonably easy to implement custom inference based on existing algorithms? E.g. implement custom proposals, and reuse the rest of the machinery as one can do in e.g. Gen.jl? Furthermore, is this documented?

As far as I understand, Mamba.jl offers this too, but it’s limited to hierarchical models (i.e. it’s not Turing-complete).

---

<div class="post-metadata">

**Author:** ![trappmartin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/trappmartin/32/1165_2.png) [@trappmartin](https://discourse.julialang.org/u/trappmartin)\
**Post date:** [October 23, 2020, 1:45pm UTC](https://discourse.julialang.org/t/is-it-possible-to-implement-custom-inference-in-turing/48468/2 "2020-10-23T13:45:44Z")

</div>

Have you had a read of this tutorial: [How Turing implements AbstractMCMC](https://turing.ml/dev/docs/for-developers/how_turing_implements_abstractmcmc) ?
