TRL documentation


Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started


You can install TRL either from pypi or from source:


Install the library with pip:

pip install trl


You can also install the latest version from source. First clone the repo and then run the installation with pip:

git clone
cd trl/
pip install -e .

If you want the development install you can replace the pip install with the following:

pip install -e ".[dev]"
< > Update on GitHub