trl logo

trl

huggingface/trl

Train transformer language models with reinforcement learning

GraphCanon updated Oct 29, 2026 · GitHub synced Oct 29, 2026

19k stars3.0k forksLast push Sep 18, 2026 Python Apache-2.0

Decision brief

Unverified catalog guidance: TRL is a Python library for training transformer language models with reinforcement learning, offering dedicated trainer classes for post-training and PEFT adapters, and supporting distributed training methods.

Good fit when

  • Unverified catalog guidance: When you need to post-train language models or PEFT adapters on custom datasets with reinforcement learning.
  • Unverified catalog guidance: If you require support for distributed training methods such as DDP, DeepSpeed ZeRO, and FSDP.

Avoid when

  • Unverified catalog guidance: If your project does not require reinforcement learning for training transformer models.
  • Unverified catalog guidance: When you do not need the specific distributed training methods supported by TRL.
Requirements:
TRL requires Python and is built on top of the Hugging Face Transformers library.

Observed Sep 18, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Very active (0d since push)
As of Sep 18, 2026
Provenance
Not a fork · Organization account
As of Sep 18, 2026
Security (OSV)
No lockfile
As of Sep 18, 2026

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Backing

Company context for Hugging Face. Display-only - separate from trust and ranking.

Company
Hugging Face·GitHub org profile·Jul 11, 2026
Employees
160·Wikidata (P1128 employees)·Jul 11, 2026
Funding
$235,000,000 (2023-08)·GraphCanon curated seed (public press)·Jul 11, 2026
Commercial model
OSS + managed cloud·GraphCanon curated seed·Jul 11, 2026

Install

Package installation is not established from the available documentation. Check the source repository for setup instructions.

git clone https://github.com/huggingface/trl
Source repository

Relationship proposals(2)

Relationship types and rationales are stored proposals, not independently verified integrations, migration guidance or endorsements.

Relationship graph

Optional deeper exploration of typed edges and category neighbours.

Relationship types and rationales are stored proposals, not independently verified integrations, migration guidance or endorsements.

Similar tools

Same-category neighbours not already linked as typed edges.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

TRL provides dedicated trainer classes for post-training language models or PEFT adapters on custom datasets, supporting distributed training methods.

Capability facts

CLI
Unknown; CLI entrypoint not verified

Source: pyproject.toml:[project.scripts] · Sep 18, 2026

Languages
python

Source: github.language+pyproject.toml · Sep 18, 2026

Categories

Graph entities

Tags

README

Quick Start For more flexibility and control over training, TRL provides dedicated trainer classes to post train language models or PEFT adapters on a custom dataset. Each trainer in TRL is a light wrapper around the 🤗 Transformers trainer and natively supports distributed train...

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.