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.

Origins

flowMC was originally developed as kazewong/flowMC by Kaze W. K. Wong and others. The original repository is no longer actively maintained; this fork is the active continuation of the project.

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.1.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.1-py3-none-any.whl (92.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flowmc-0.6.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e63eaad9ca676af554d0a6545cde3c00f1eb6ab923ce1487fdfcae19a0267828
MD5 aba181df2280600fb03c8a6e79f7c703
BLAKE2b-256 3a3e79ee470c40bd3ae596f17934a62aa3cd8003a7ebe778df87889915ad448a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flowmc-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 92.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a50e995c3ce86432cc0a8671ac40a70901f0939854beca2b33357d3fcb4b6e0
MD5 d7571da33d4b0b0f7b597fc4c2c1a17b
BLAKE2b-256 8cf56207853e96ffad01c036b5009db8d5b094868574fa25c74739eaa6d1b7c4

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