JMLR

torchgfn: A PyTorch GFlowNet Library

Authors
Joseph D. Viviano Omar G. Younis Sanghyeok Choi Victor Schmidt Yoshua Bengio Salem Lahlou
Paper Information
  • Journal:
    Journal of Machine Learning Research
  • Added to Tracker:
    Sep 08, 2026
Abstract

The growing popularity of generative flow networks (GFlowNets or GFNs) among a range of researchers with diverse backgrounds and areas of expertise necessitates a library that facilitates the testing of new features (e.g., training losses and training policies) against standard benchmark implementations, or on a set of common environments. We present torchgfn, a PyTorch library that aims to address this need. Its core contribution is a modular and decoupled architecture which treats environments, neural network modules, and training objectives as interchangeable components. This provides users with a simple yet powerful API to facilitate rapid prototyping and novel research. Multiple examples are provided, replicating and unifying published results. The library is available on GitHub (https://github.com/GFNOrg/torchgfn) and on PyPI (https://pypi.org/project/torchgfn/).

Author Details
Joseph D. Viviano
Author
Omar G. Younis
Author
Sanghyeok Choi
Author
Victor Schmidt
Author
Yoshua Bengio
Author
Salem Lahlou
Author
Citation Information
APA Format
Joseph D. Viviano , Omar G. Younis , Sanghyeok Choi , Victor Schmidt , Yoshua Bengio & Salem Lahlou . torchgfn: A PyTorch GFlowNet Library. Journal of Machine Learning Research .
BibTeX Format
@article{paper1641,
  title = { torchgfn: A PyTorch GFlowNet Library },
  author = { Joseph D. Viviano and Omar G. Younis and Sanghyeok Choi and Victor Schmidt and Yoshua Bengio and Salem Lahlou },
  journal = { Journal of Machine Learning Research },
  url = { https://www.jmlr.org/papers/v27/23-1095.html }
}