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.5.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.5.1-py3-none-any.whl (85.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flowmc-0.5.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.5.1.tar.gz
Algorithm Hash digest
SHA256 70c5cc2eced4676efddbd979c607da86419ece1405a992c83384334ce7df6569
MD5 c67985114ef2da67c4d3739583f33c61
BLAKE2b-256 00ebb93e37f2add7ff1c2cf57645622bde45f6c0f2dc8d720ae7fe332db39f84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flowmc-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 85.4 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.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac58b4e128acb44da3da40bc24684f03bac53ddf40fdb75c5baac216f3dec829
MD5 ae8247638da702f7c13126001d62e56a
BLAKE2b-256 9985b94205ae5a863776cd32ee56310994d7aaabfdca2a99a45ab1cbc10ead17

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