Ross ROSS = Recommend OSS · open-source software intelligence for agents

huggingface/trl

Train transformer language models with reinforcement learning. observed · 2026-08-28

github.com/huggingface/trl · homepage · Python · Apache-2.0 (permissive) observed · 2026-08-28

Health v2 · maintenance only

99/100

  • Activity 99
  • 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-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 11.0
  • age_days: 2350
  • days_rel: 7
  • days_push: 7
  • n_releases_24m: 57

Full methodology

Adoption not part of the score

19155 stars · 2933 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded

TRL is a Hugging Face library for post-training transformer language models with techniques like Supervised Fine-Tuning (SFT), GRPO, DPO, KTO, reward modeling, and knowledge distillation. It builds on the Transformers ecosystem and scales from single GPUs to multi-node clusters via Accelerate, DeepSpeed, PEFT/LoRA, and vLLM.

Use cases

  • fine-tune an LLM with SFT on my own dataset
  • train a language model with RLHF or DPO preference optimization
  • run GRPO reinforcement learning to improve model reasoning
  • post-train a foundation model with LoRA on a single GPU
  • distill a teacher LLM into a smaller student model
  • train a reward model for preference tuning
  • scale LLM fine-tuning across multiple GPUs with DeepSpeed

When to choose

  • You want to fine-tune or post-train transformer LLMs within the Hugging Face Transformers ecosystem
  • You need modern alignment methods like SFT, DPO, GRPO, or KTO with a consistent trainer API
  • You want parameter-efficient training (LoRA/QLoRA) or multi-GPU/multi-node scaling out of the box

When to avoid

  • You are training non-transformer models or non-language modalities
  • You need a framework-agnostic trainer outside PyTorch/Hugging Face
  • You only need inference or serving of models rather than training

Facets

library · maturity active

llm-training machine-learning deep-learning cli large-language-models machine-learning reinforcement-learning artificial-intelligence python windows rlhf sft dpo grpo post-training huggingface transformers fine-tuning peft vllm gpu linux macos

10 sources

Member repositories

RepositoryRoleHealth v2
huggingface/trlmain99

For agents

markdown · JSON · MCP: product_card(name="huggingface/trl")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem