{"data":{"slug":"huggingface-trl","name":"trl","tagline":"Train transformer language models with reinforcement learning","github_url":"https://github.com/huggingface/trl","owner":"huggingface","repo":"trl","owner_avatar_url":"https://avatars.githubusercontent.com/u/25720743?v=4","primary_language":"Python","stars":19336,"forks":3002,"topics":[],"archived":false,"github_pushed_at":"2026-09-18T06:20:19+00:00","maintenance_label":"Very active","stars_delta_30d":320,"url":"https://www.graphcanon.com/tools/huggingface-trl","markdown_url":"https://www.graphcanon.com/tools/huggingface-trl.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/huggingface-trl","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=huggingface-trl","description":"Train transformer language models with reinforcement learning.","homepage_url":"http://hf.co/docs/trl","license":"Apache-2.0","open_issues":285,"watchers":108,"ai_summary":"TRL provides dedicated trainer classes for post-training language models or PEFT adapters on custom datasets, supporting distributed training methods.","readme_excerpt":"## Quick Start\n\nFor 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 training methods like DDP, DeepSpeed ZeRO, and FSDP.\n\n---\n\n## License\n\nThis repository's source code is available under the [Apache-2.0 License](LICENSE).","github_created_at":"2020-03-27T10:54:55+00:00","created_at":"2026-07-07T22:37:41.074462+00:00","updated_at":"2026-09-20T04:28:44.780529+00:00","categories":[{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"distributed-training","name":"distributed training"},{"slug":"huggingface","name":"huggingface"},{"slug":"python","name":"python"},{"slug":"reinforcement-learning","name":"reinforcement learning"},{"slug":"transformers","name":"transformers"}],"trust":{"provenance":{"is_fork":false,"github_id":250510075,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-18T08:09:47.272Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":10,"days_since_push":0,"last_release_at":"2026-09-10T00:50:26Z","stars_delta_30d":320,"open_issues_delta_30d":35},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-09-18T08:09:49.288Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-18T08:09:46.123Z"},"has_cli":{"value":true,"source":"pyproject.toml:[project.scripts]","observed_at":"2026-09-18T08:09:46.123Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-09-18T08:09:46.123Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-09-18T08:09:46.123Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":{"notes":["TRL requires Python and is built on top of the Hugging Face Transformers library."],"min_ram_gb":null,"requires_docker":false},"constraints":{"min_ram_gb":null,"requires_docker":false},"when_to_use":["When you need to post-train language models or PEFT adapters on custom datasets with reinforcement learning.","If you require support for distributed training methods such as DDP, DeepSpeed ZeRO, and FSDP.","For more control and flexibility over the training process compared to general-purpose training libraries."],"when_not_to_use":["If your project does not require reinforcement learning for training transformer models.","When you do not need the specific distributed training methods supported by TRL.","If you prefer a more general-purpose training library without the specialized reinforcement learning features."],"source":"enrich:decision_facts","observed_at":"2026-09-18T11:48:48.220Z"},"constraint_facets":{"min_ram_gb":null,"requires_docker":false},"decision_summary":[{"label":"Requirements","value":"TRL requires Python and is built on top of the Hugging Face Transformers library."},{"label":"Adopt for","value":"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."},{"label":"License detail","value":"TRL is licensed under the Apache-2.0 License, allowing for free use, modification, and distribution."}]}}