
TRL is a full stack library where we provide a set of tools to train transformer language models with Reinforcement Learning, from the Supervised Fine-tuning step (SFT), Reward Modeling step (RM) to the Proximal Policy Optimization (PPO) step. The library is integrated with 🤗 transformers.

Check the appropriate sections of the documentation depending on your needs:
API documentation:
SFTTrainer: Supervise Fine-tune your model easily with SFTTrainerRewardTrainer: Train easily your reward model using RewardTrainer.PPOTrainer: Further fine-tune the supervised fine-tuned model using PPO algorithmDPOTrainer: Direct Preference Optimization training using DPOTrainer.Examples: