TRL documentation
Installation
Get started
TRLQuickstartInstallationGet started with Command Line Interfaces (CLIs)PPO Training FAQUse Trained ModelsCustomize the TrainingUnderstanding Logs
API
Model ClassesTrainer ClassesReward Model TrainingSupervised Fine-TuningPPO TrainerPPOv2 TrainerRLOO TrainerBest of N SamplingDPO TrainerKTO TrainerCPO TrainerDenoising Diffusion Policy OptimizationAlignProp TrainerORPO TrainerIterative Supervised Fine-TuningText Environments
Examples
You are viewing v0.9.6 version. A newer version v1.4.0 is available.
Installation
You can install TRL either from pypi or from source:
pypi
Install the library with pip:
pip install trl
Source
You can also install the latest version from source. First clone the repo and then run the installation with pip:
git clone https://github.com/huggingface/trl.git
cd trl/
pip install -e .If you want the development install you can replace the pip install with the following:
pip install -e ".[dev]"