{"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":19016,"forks":2891,"topics":[],"archived":false,"github_pushed_at":"2026-08-06T10:02:43+00:00","maintenance_label":"Very active","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":250,"watchers":102,"ai_summary":"TRL from Hugging Face offers dedicated trainer classes for fine-tuning or PEFT adapter post-training on custom datasets, supporting various 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-08-06T12:00:39.339775+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":"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-08-06T12:00:38.276Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":10,"days_since_push":0,"last_release_at":"2026-07-28T10:39:01Z"},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T10:29:52.104Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-06T12:00:38.964Z"},"has_cli":{"value":true,"source":"pyproject.toml:[project.scripts]","observed_at":"2026-08-06T12:00:38.964Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-08-06T12:00:38.964Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-08-06T12:00:38.964Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":{"min_ram_gb":8,"requires_docker":false},"constraints":{"min_ram_gb":8,"requires_docker":false},"when_to_use":["You need to fine-tune transformer language models with reinforcement learning using Python.","Your project requires flexibility and control over the reinforcement learning training process.","You are working with large-scale datasets that benefit from distributed training methods such as DDP (Distributed Data Parallel), DeepSpeed ZeRO, or FSDP (Fully Sharded Data Parallel)."],"when_not_to_use":["If your task does not involve transformer language models or if you do not plan to use reinforcement learning for model fine-tuning.","When strict control over training parameters is less critical and a more streamlined framework suffices.","Your project's dataset size and computational requirements don't necessitate sophisticated distributed training mechanisms like DDP, DeepSpeed ZeRO, or FSDP."],"source":"enrich:decision_facts","observed_at":"2026-07-11T11:00:16.636Z"},"constraint_facets":{"min_ram_gb":8,"requires_docker":false},"decision_summary":[{"label":"Requirements","value":"Min 8 GB RAM"},{"label":"Adopt for","value":"TRL (Train Reinforcement Learning) by Hugging Face provides specialized trainer classes designed for fine-tuning or PEFT adapter post-training on custom datasets, including support for multiple distributed training modes"},{"label":"License detail","value":"TRL operates under the Apache-2.0 License, allowing for broad usage and modification under specific conditions including copyright preservation and license notices."}]}}