huggingface/trl
Train transformer language models with reinforcement learning. observed · 2026-10-17
Health v2 · maintenance only
100/100
- Activity 100
- Release rhythm 99
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 11
- age_days: 2398
- days_rel: 5
- days_push: 4
- n_releases_24m: 58
Adoption not part of the score
19532 stars · 3070 forks observed · 2026-10-17
What it is AI-extracted, prompt v1, taxonomy v1, 2026-10-19, confidence 0.97
TRL is a Python library that enables post‑training of transformer language models with reinforcement‑learning techniques such as SFT, DPO, and GRPO. It builds on Hugging Face Transformers and integrates with Accelerate for scalable training.
Use cases
- fine‑tune a large language model with preference data
- apply direct preference optimization to improve model responses
- train a chatbot using reinforcement learning from human feedback
- scale supervised fine‑tuning across multiple GPUs or nodes
- customize reward modeling for specific tasks
When to choose
- you need a high‑level API for RL‑based fine‑tuning of LLMs
- you already use Hugging Face Transformers and want seamless integration
- you require support for advanced methods like DPO, GRPO, or SFT
- you plan to train on multi‑GPU or cloud hardware via Accelerate
When to avoid
- you only need inference or serving capabilities
- your project is in a language other than Python
- you require a lightweight, no‑dependency solution for tiny models
Facets
library · maturity active
agent-framework artificial-intelligence machine-learning deep-learning large-language-models reinforcement-learning python windows rlhf sft dpo grpo peft accelerate-integration linux macos
10 sources
- readme: https://github.com/huggingface/trl · fetched 2026-10-17 · 324c1edf10fa
- homepage: http://hf.co/docs/trl · fetched 2026-10-05 · 7c2ee4bafa64
- site_page: https://huggingface.co/docs · fetched 2026-10-05 · bdec26667b98
- site_page: https://huggingface.co/docs/trl/quickstart · fetched 2026-10-05 · 103456a8aaab
- site_page: https://huggingface.co/docs/trl/usage_stats · fetched 2026-10-05 · a4e37bb22870
- site_page: https://huggingface.co/docs/trl/chat_templates · fetched 2026-10-05 · 78a1ec68afdb
- site_page: https://huggingface.co/docs/trl/dataset_formats · fetched 2026-10-05 · e989fc13a534
- site_page: https://huggingface.co/docs/trl/paper_index · fetched 2026-10-05 · 50c37e840eed
- site_page: https://huggingface.co/docs/trl/installation · fetched 2026-10-05 · fab24aa8e55b
- registry_pypi: https://pypi.org/pypi/trl/json · fetched 2026-10-05 · 7bc9dba5f141
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| huggingface/trl | main | 100 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem