PyTorch library for training and extending Generative Flow Networks (GFlowNets)
Top 97.2% on sourcepulse
This library provides a PyTorch-based framework for Generative Flow Networks (GFNs), enabling probabilistic and generative modeling with applications in scientific discovery. It allows users to sample diverse objects with high rewards by decomposing generation into compositional states and learning transition probabilities, targeting researchers and engineers in fields like drug discovery, materials science, and reinforcement learning.
How It Works
GFNs model the generation of objects by learning to navigate a state space, transitioning from a source state to a final state. The library implements this by training neural network policies to approximate forward and backward state transitions. It utilizes a "proxy" function to define rewards for generated states, allowing the GFN agent to optimize sampling towards high-reward configurations through various loss functions like Flow Matching (FM) and Trajectory Balance (TB).
Quick Start & Requirements
source install.sh
.dev
, materials
, molecules
.python train.py
with Hydra configurations (e.g., +experiments=grid/corners
).python eval.py rundir=<path_to_run_directory>
.python resume.py rundir=<path_to_run_directory>
.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
device=cuda
) is needed to leverage GPUs.2 weeks ago
1 day