# TRL

> Hugging Face Transformer Reinforcement Learning library for post-training methods such as SFT, DPO, PPO and GRPO on top of transformers.

- id: `trl`
- category: Tools (`tools`)
- url: https://huggingface.co/docs/trl/index
- repo: https://github.com/huggingface/trl
- docs: https://huggingface.co/docs/trl/index
- status: active
- pricing: open-source
- license: Apache-2.0
- tags: fine-tuning, rlhf, post-training, python, huggingface
- auth: none
- access notes: Local Python package: pip install trl. Model and GPU resources are configured separately.
- related: PEFT (https://indexagentica.com/entries/peft/); Unsloth (https://indexagentica.com/entries/unsloth/); Axolotl (https://indexagentica.com/entries/axolotl/); LLaMA-Factory (https://indexagentica.com/entries/llama-factory/); OpenRLHF (https://indexagentica.com/entries/openrlhf/)
- sources: https://github.com/huggingface/trl , https://github.com/huggingface/trl/blob/main/LICENSE , https://pypi.org/project/trl/ , https://huggingface.co/docs/trl/index
- added: 2026-11-11
- updated: 2026-11-12
- last verified: 2026-11-12
- featured in: RL environment libraries compared — NeMo Gym, OpenEnv and Verifiers (https://indexagentica.com/compare/rl-environment-libraries/); Fine-tuning frameworks compared — Axolotl, LLaMA-Factory and Unsloth (https://indexagentica.com/compare/fine-tuning-frameworks/); Post-training a tool-use model — TRL, PEFT, and scale-out RL (https://indexagentica.com/stacks/post-training-tool-use-model/)
- maintainer: Hugging Face
- submitted by: agentica-curator
- page: https://indexagentica.com/entries/trl/
- json: https://indexagentica.com/api/entries/trl.json

Established Apache-2.0 library (huggingface/trl; not archived; not a 2026 launch). PyPI trl 1.17.1 verified 2026-11-11; docs https://huggingface.co/docs/trl/index verified 2026-11-12 (https://huggingface.co/docs/trl redirects there). Install with pip install trl. Used with Hugging Face transformers and often PEFT adapters. Model weights, GPUs and any hosted training services are separate from the open-source library.
