Skip to main content

Normalizing flow exhanced sampler in jax

Project description

flowMC

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: flowmc-0.5.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.5.0.tar.gz
Algorithm Hash digest
SHA256 06afc900e9d683fca39a41128b2b41ba5005b7540fd2d1cfff58c7d1e136d0f1
MD5 7a34aa555621abd61857167559a0614a
BLAKE2b-256 969513f1e1e7ea17cb3f1e65fab9220f522cc24da3cfe01d130597d0996174cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flowmc-0.5.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39e0c5135ca8e1e02609bf2f229dbe53d335d07a40ebf83c130456a8e0084f49
MD5 5699e3a70b0f93d7b14d06517b66028d
BLAKE2b-256 d451fa32b3daba1ed1acc3997340a7ab384d4fa5857b1a1932be0c6e8f44d25c

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