Skip to main content

TRL

Train transformer language models with reinforcement learning.

View on GitHub Official site
Fine Tuning Training Apache-2.0 18,906 stars

Overview

Description

Get better results from your AI models by fine-tuning them with reinforcement learning — the same technique used to train DeepSeek-R1. TRL provides ready-to-use trainers for the most effective alignment methods (DPO, GRPO, SFT) so you don't need a PhD team to do it. Scale from a single GPU to a multi-node cluster with just a few lines of code.

Technical scorecard

License

Apache-2.0

Commercial use

Yes

OpenAI-compatible API

No

REST API

No

Fine-tuning support

No

Quantization support

No

Docker available

Yes

GUI / no-code available

No

Telemetry

Unknown

Offline after setup

No

Data & Privacy

Does it send data online?

This listing is not marked offline after setup.

Does it store history?

Not verified in this directory yet. Review the upstream docs for persistence, logs, and workspace storage.

License checks?

Commercial use is marked as allowed or likely allowed by the listed license.

Telemetry?

Unknown

Last verified: Jul 22, 2026. Maintainer verification should be treated as directory guidance, not legal advice.

🛡️

Deploying TRL in production?

Stop silent telemetry leaks before they trigger an unintended data leak. Get our Airgap Certainty Blueprint for TRL.

Request Privacy and Telemetry Audit

Setup & Installation

A developer can usually get this running with standard docs.

# Start with the official project repository
# https://github.com/huggingface/trl

Hardware Requirements

Hardware tagsGPU (NVIDIA)
LanguagesPython

Works Well With