ml4gw is installable with pip:

$ pip install ml4gw

To build with a specific version of PyTorch/CUDA, please see the PyTorch installation instructions to see how to specify the desired torch version and --extra-index-url flag. For example, to install with PyTorch 1.12 and CUDA 11.6, use the following command:

$ pip install ml4gw torch==1.12.0 --extra-index-url=


ml4gw is also fully compatible with Poetry, with a pyproject.toml set up like

python = "^3.8"  # python versions 3.8-3.10 are supported
ml4gw = "^0.1.0"
torch = {version = "^1.12", source = "torch"}

name = "torch"
url = ""
secondary = true
default = false

which will install ml4gw with PyTorch 1.12 built with CUDA 11.6.