Examples for the GenSBI library
Project description
GenSBI Examples
This repository contains a collection of examples, tutorials, and recipes for GenSBI, a JAX-based library for Simulation-Based Inference using generative models.
These examples demonstrate how to use GenSBI for various tasks, including:
- Defining and running inference pipelines.
- Using different embedding networks (MLP, ResNet, etc.).
- Handling various data types (1D signals, 2D images).
Installation
Prerequisites
You need to have GenSBI and the examples package installed.
With CUDA 12 support (Recommended):
pip install gensbi[cuda12, examples]
CPU-only:
pip install gensbi
Install Examples Package
To download these examples, clone the github repository:
git clone https://github.com/aurelio-amerio/GenSBI-examples.git
Structure
examples/: Contains standalone example scripts and notebooks.src/gensbi_examples: Helper utilities for the examples.
Getting Started
Neural Density Estimators (NDE)
These examples demonstrate the usage of Neural Density Estimators for unconditional density estimation tasks.
- Diffusion 2D Unconditional:
- Flow Matching 2D Unconditional:
- Flow Matching 2D Unconditional (Flux1Joint):
SBI Benchmark Examples
This repository includes a comprehensive suite of Simulation-Based Inference (SBI) benchmarks. These examples cover a range of standard tasks used to evaluate SBI methods, including simple distributions, physical systems, and complex toy problems. For each task, we provide implementations using various generative models available in GenSBI, such as Flow Matching and Diffusion models with different architectures (Flux, SimFormer).
Two Moons
- Diffusion Flux:
- Diffusion Flux1Joint:
- Diffusion SimFormer:
- Flow Flux:
- Flow Flux1Joint:
- Flow SimFormer:
Bernoulli GLM
Gaussian Linear
Gaussian Mixture
Gravitational Waves
Lensing
SLCP
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gensbi_examples-0.2.0.tar.gz.
File metadata
- Download URL: gensbi_examples-0.2.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd164f2b8315b2ae9f13e84cdac6e6d4582d32b0c765e673d65a8a75e9da3b3
|
|
| MD5 |
999c94cb4a3a02776da23653f06c4650
|
|
| BLAKE2b-256 |
de962e52d5b8e39e8e7bb23d5d706c57f566c836e6f9f6730e44db0f564b6839
|
File details
Details for the file gensbi_examples-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gensbi_examples-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec48d83ac7c98273ff86b2627e85b60cd6d16108fdcde0e635ec7860ac1c4575
|
|
| MD5 |
4b9c60b432eb1d8069c0232782efad3a
|
|
| BLAKE2b-256 |
eeeae85043442020b57d5491721eec4824aee392cc88f547db890df47843160a
|