Flow Gym
Project description
Flow Gym
flowgym is a library for reward adaptation of any pre-trained flow model on any data modality.
Installation
In order to install flowgym, execute the following command:
pip install flowgym
If you want access to pre-trained image or molecular generation models, specify them as options:
pip install flowgym[images]
pip install flowgym[molecules]
If you want to run value matching on your environment, you will need to install it:
pip install value_matching
High-level overview
Diffusion and flow models are largely agnostic to their data modality. They only require that the underlying data type supports a small set of operations. Building on this idea, flowgym is designed to be fully modular. You only need to provide the following:
- Data type that implements
DataProtocol, which defines basic arithmetic operations, factory methods, and gradient methods. - Base model
BaseModel[YourDataType], which defines the scheduler, how to sample $p_0$, how to compute the forward pass, and how to preprocess and postprocess data. - Reward function
Reward[YourDataType].
Once these are defined, you can sample from the flow model and apply reward adaptation methods, such as Value Matching.
Documentation
Much more information can be found in the documentation, including tutorials and API references.
Project details
Release history Release notifications | RSS feed
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 flowgym-1.0.tar.gz.
File metadata
- Download URL: flowgym-1.0.tar.gz
- Upload date:
- Size: 5.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e59cf26d09bc748124417bdcf4809978df2a6a7636e36426ff2cbb2084c665f
|
|
| MD5 |
8471e402b239b4c833d328bfe2a04508
|
|
| BLAKE2b-256 |
66beaf66c6655d26b47197c941152fb5f05804d331c0366d37ec983831b6a502
|
File details
Details for the file flowgym-1.0-py3-none-any.whl.
File metadata
- Download URL: flowgym-1.0-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd03bb70d9e0243b5b06ef5d9c3a23c1779063eb06c7d111b9836a1da99e57ef
|
|
| MD5 |
8ae5d2016378f16c4f195e3c62b94192
|
|
| BLAKE2b-256 |
293303082d563a7f481e1cde5345df92a532c5dca3bba5989c202c2ef735faec
|