Skip to content

cgreer/gflownets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gflownets

A Basic GFlowNet Setup

Training Dash

Overview

gflownets implements a GFlowNet using the trajectory balance loss on the Smiley Environment.

Includes some basic goodies that were recommended at the GFlowNet Workshop:

  • Off-policy training via dithering (tempering + eps-greedy)
  • Gradient clipping
  • Monitoring
    • Pf/Pb Entropy
    • ||Gradient||
    • Rewards (avg/max)

See torchgfn and gflownet for mature libraries.



Install

Clone Repo

git clone git@github.com:cgreer/gflownets.git

Create Virtual Environment

python3 -m venv gfn

Install Packages

Activate virtual environment:

source gfn/bin/activate

Install requirements:

pip install -r requirements.txt



Train on Smiley Environment

python train_smiley.py

After training completes it will run the evaluation analysis and show the training dashboard:

Training Dash Smiley Eval

If training ran correctly, then smiley faces should be sampled proportional to their reward (~66% smiley) and the estimate for Z should be ~12.



About

Basic GFlowNet Setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages