huggingface

    huggingface/trl

    Train transformer language models with reinforcement learning.

    backend
    Python
    Apache-2.0
    19.7K stars
    3.1K forks
    19.7K GitHub watchers
    Updated Nov 1, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    5 releases in the last 90 days, the latest 2 days ago, with 465 contributors on GitHub.

    Gained 9% fewer stars in the last 90 days than in the 90 days before.

    Use Cases & Benefits

    • Enables post-training of transformer language models using reinforcement learning and supervised fine-tuning techniques.
    • Offers scalable, efficient training with support for multiple algorithms and hardware setups, integrating with Hugging Face Transformers and Accelerate.
    • Use for fine-tuning large language models with reinforcement learning algorithms like PPO and DPO to improve model alignment with human preferences.
    • Use for training reward models or adapters on custom datasets to optimize language model outputs for specific tasks or domains.
    • Use for experimenting with cutting-edge training methods on foundation models via a simple CLI or Python API without extensive coding.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    Apache 2.0

    Permissive: commercial use, modification and redistribution are allowed with attribution; includes an explicit patent grant from contributors.

    Community files

    • README: present
    • Contributing guide: present
    • Code of conduct: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    A comprehensive library to post-train foundation models

    ✨ OpenAI GPT OSS Support: TRL now fully supports fine-tuning the latest OpenAI GPT OSS models! Check out the:

    TRL is a cutting-edge library designed for post-training foundation models using advanced techniques like Supervised Fine-Tuning (SFT), Proximal Policy Optimization (PPO), and Direct Preference Optimization (DPO). Built on top of the 🤗 Transformers ecosystem, TRL supports a variety of model architectures and modalities, and can be scaled-up across various hardware setups.

    Excerpt from the huggingface/trl README on GitHub (Apache-2.0 license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    3.1K+226

    Open issues

    326+77

    Compared with peers in Backend

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth

    huggingface/trl compared with Backend repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    anthropics/skills191.0K+4.2K15—
    zed-industries/zed94.6K+2.3K655 days ago
    NationalSecurityAgency/ghidra99.1K+1.9K6418 days ago
    DuarteSantos8/openGym20.6K+1.7K606 days ago
    shiyu-coder/Kronos47.4K+1.4K16—
    huggingface/trl19.7K—652 days ago
    Category median94.6K+1.9K60—

    Also by huggingface

    Other repositories from this maintainer that GStars tracks

    Discover Repositories

    Search across tracked repositories by name or description