Skip to main content

A JAX-based normalizing-flow-enhanced MCMC sampler for probabilistic inference

Project description

flowMC

A JAX-based normalizing-flow-enhanced MCMC sampler for probabilistic inference

docs license coverage pre-commit.ci status

flowMC_logo

flowMC is a JAX-based package for normalizing-flow-enhanced Markov chain Monte Carlo (MCMC) sampling. By using normalizing flows as a global proposal, flowMC accelerates convergence for multi-modal and high-dimensional posteriors while running natively on GPU with minimal hyperparameter tuning.

For a quick introduction, see the Quick Start guide.

[!WARNING] flowMC has not yet reached v1.0.0 and the API may change. Use at your own risk. Consider pinning to a specific version if you need API stability.

Installation

The simplest way to install flowMC is through pip:

pip install flowMC

This will install the latest stable release and its dependencies. flowMC is built on JAX. By default, this installs the CPU version of JAX. If you have an NVIDIA GPU, install the CUDA-enabled version:

pip install flowMC[cuda]

If you want to install the latest version of flowMC, you can clone this repo and install it locally:

git clone https://github.com/GW-JAX-Team/flowMC.git
cd flowMC
pip install -e .

We recommend using uv to manage your Python environment. After cloning the repository, run uv sync to create a virtual environment with all dependencies installed.

Attribution

If you use flowMC in your research, please cite the following papers:

@article{Wong:2022xvh,
    author = "Wong, Kaze W. k. and Gabri\'e, Marylou and Foreman-Mackey, Daniel",
    title = "{flowMC: Normalizing flow enhanced sampling package for probabilistic inference in JAX}",
    eprint = "2211.06397",
    archivePrefix = "arXiv",
    primaryClass = "astro-ph.IM",
    doi = "10.21105/joss.05021",
    journal = "J. Open Source Softw.",
    volume = "8",
    number = "83",
    pages = "5021",
    year = "2023"
}

@article{Gabrie:2021tlu,
    author = "Gabri\'e, Marylou and Rotskoff, Grant M. and Vanden-Eijnden, Eric",
    title = "{Adaptive Monte Carlo augmented with normalizing flows}",
    eprint = "2105.12603",
    archivePrefix = "arXiv",
    primaryClass = "physics.data-an",
    doi = "10.1073/pnas.2109420119",
    journal = "Proc. Nat. Acad. Sci.",
    volume = "119",
    number = "10",
    pages = "e2109420119",
    year = "2022"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowmc-0.6.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flowmc-0.6.0-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

Details for the file flowmc-0.6.0.tar.gz.

File metadata

  • Download URL: flowmc-0.6.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowmc-0.6.0.tar.gz
Algorithm Hash digest
SHA256 67df0f482cd716a031a0b42a052d9f3e73c931a858aa8c77c3b19172dcef376f
MD5 089079dc7c83214daa155a872c67d0a0
BLAKE2b-256 d9db4c931fda0e3d710fca7d5c6129b7fbd6e3008beb8aa32ef85a83b6ac1d66

See more details on using hashes here.

File details

Details for the file flowmc-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: flowmc-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 92.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowmc-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e6f0d4fe4f7b3dde4108cf374ffd13b51bed3ba84e18e4b8c13534293f35df9
MD5 ae61e7de80bb2be482b4e7332ffd3635
BLAKE2b-256 0e8e9888bdefca64bba6d3660c184670270771380b2d1830e1710aa3a1418cce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page