22nd of 126 in Training and fine-tuning
trl
Python library for post-training LLMs with SFT, DPO, GRPO and KTO
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts trl on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.trl is on your watch list. Its new releases and problems show there.
- Stars
- 19.9k
- License
- Apache-2.0
- Last commit
- Nov 2026
- Last release
- Nov 2026
- Language
- Python
17,623 on 25 Mar 202619,860 on 25 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
TRL provides trainer classes (SFTTrainer, GRPOTrainer, AsyncGRPOTrainer, DPOTrainer, KTOTrainer, RewardTrainer) for post-training Hugging Face Transformers models. It builds on Accelerate for DDP, DeepSpeed and FSDP scaling, and on PEFT for LoRA/QLoRA. A `trl` CLI runs SFT, DPO and KTO without writing code.
Who it is for: ML engineers fine-tuning and aligning LLMs with Hugging Face tooling
Strengths
- Covers SFT, DPO, KTO, GRPO and reward model training behind one trainer API
- Scales from one GPU to multi-node via Accelerate, DDP, DeepSpeed ZeRO and FSDP
- PEFT integration allows LoRA/QLoRA training of large models on modest hardware
- CLI runs sft, dpo and kto jobs from the shell without code
Weaknesses
- AsyncGRPOTrainer needs a separate vLLM server on a different GPU than the trainer
- Features under trl.experimental may change or be removed in any release
- Tied to the Hugging Face Transformers ecosystem and its model formats
- accuracy_reward needs the extra math-verify install
What it needs
- GPU optional
- Docker
- Needs transformers, accelerate, peft, datasets, vllm (AsyncGRPOTrainer), math-verify (accuracy_reward)
- Models: Hugging Face Transformers models, LoRA/QLoRA adapters via PEFT
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Head to head
Also in Training and fine-tuning
See all 126| Rank | Project | Score |
|---|---|---|
| 1 | peftPython library for LoRA and other parameter-efficient fine-tuning methods | 91 out of 100 |
| 3 | megatron-lmNVIDIA's library for training large transformer models across many GPUs | 89 out of 100 |
| #4 | unslothDesktop and web app to run and fine-tune local models | 88 out of 100 |
| #5 | deepspeedPyTorch library for distributed training of very large models with ZeRO | 88 out of 100 |
| #6 | axolotlYAML-driven framework for fine-tuning and post-training LLMs | 88 out of 100 |