Skip to content


Birch is a probabilistic programming language featuring automatic marginalization, automatic conjugacy, automatic differentiation, and inference algorithms based on Sequential Monte Carlo (SMC). The Birch language transpiles to C++.

See for a gentle introduction, and for reference documentation.

lawmurray codecov


Birch is open source software.

It is licensed under the Apache License, Version 2.0 (the "License"); you may not use it except in compliance with the License. You may obtain a copy of the License at

Getting started


Packages are provided for major Linux distributions. Click through to the Open Build Service and select your distribution for installation instructions.


Install Homebrew if not already, then install Birch with:

brew tap lawmurray/birch
brew install birch


Native support is not yet provided, but you can install Windows Subsystem for Linux with a Linux distribution of your choice, then click through to the Open Build Service and select that distribution for installation instructions.

From source

If a package is not available for your operating system or you have special requirements, you can install from source. This requires:

All Birch sources are in the same repository. The master branch is considered stable. Clone it:

git clone

Install the driver by running, from within the driver/ directory:

make install

Install LibBirch by running, from within the libbirch/ directory:

make install

Install the standard library by running, from within the libraries/Standard/ directory:

birch build
birch install

This constitutes a minimal install. You may also like to install other packages in the libraries/ directory. It is not usual to install the packages in the examples/ directory, although you may like to build and run these for testing or learning purposes.