{
 "schema_version": 1,
 "generated": "2026-10-31",
 "repo": "huggingface/trl",
 "name": "trl",
 "owner": "huggingface",
 "slug": "huggingface-trl",
 "github": "https://github.com/huggingface/trl",
 "what": "TRL is Hugging Face's library for post-training foundation models. It provides trainers for Supervised Fine-Tuning (SFT), GRPO, DPO, KTO and reward modeling on top of Transformers, scales from one GPU to multi-node clusters with Accelerate, integrates PEFT for LoRA and QLoRA, and ships a CLI that fine-tunes without writing code.",
 "why": "20k stars, talked about in 2 AI sources we track",
 "language": "Python",
 "requirements": [
  "Python with pip",
  "A GPU is strongly recommended; the README covers NVIDIA, AMD and AWS Trainium setups",
  "Access to Hugging Face Hub models and datasets"
 ],
 "audience_note": "ML engineers and tinkerers who want to fine-tune or align open models with standard recipes.",
 "risk": "none",
 "section": "earlier",
 "weekly_rank": null,
 "category": "Software and DevOps",
 "url": "https://dedupedai.com/use-cases/huggingface-trl/",
 "use_case_count": 3,
 "use_cases": [
  {
   "id": "huggingface-trl--fine-tune-a-small-model-with-the-trl-cli",
   "title": "Fine-tune a small model from the command line",
   "best": true,
   "url": "https://dedupedai.com/use-cases/huggingface-trl/fine-tune-a-small-model-with-the-trl-cli/",
   "json": "https://dedupedai.com/use-cases/u/huggingface-trl/fine-tune-a-small-model-with-the-trl-cli.json"
  },
  {
   "id": "huggingface-trl--align-a-model-to-preferences-with-trl-dpo",
   "title": "Align a model to preferences with DPO",
   "best": false,
   "url": "https://dedupedai.com/use-cases/huggingface-trl/align-a-model-to-preferences-with-trl-dpo/",
   "json": "https://dedupedai.com/use-cases/u/huggingface-trl/align-a-model-to-preferences-with-trl-dpo.json"
  },
  {
   "id": "huggingface-trl--train-a-reasoning-model-with-trl-grpo",
   "title": "Train math reasoning with GRPO",
   "best": false,
   "url": "https://dedupedai.com/use-cases/huggingface-trl/train-a-reasoning-model-with-trl-grpo/",
   "json": "https://dedupedai.com/use-cases/u/huggingface-trl/train-a-reasoning-model-with-trl-grpo.json"
  }
 ],
 "disclaimer": "Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk."
}
