Skip to content
ai-supply.store
DécouvrirCatégoriesClassementsCommunautéAgent APIFAQ
PublierSe connecter
catalog / Language & NLP / TRL (Transformer Reinforcement Learning)
⊜Fine-tuneLanguage & NLPFree

TRL (Transformer Reinforcement Learning)

Fine-tune LLMs with RLHF, PPO, DPO, SFT, and GRPO — the standard library for aligning language models.

@ai-supply
Installations380k
Note★ 4.8
Avis127
↗ Dépôt source

TRL — Transformer Reinforcement Learning

TRL is a full-stack library by Hugging Face for training transformer language models with reinforcement learning from human feedback (RLHF) and related alignment techniques. It provides efficient trainers for every stage of the modern LLM alignment pipeline.

Key Features

  • SFTTrainer: supervised fine-tuning with packing, LoRA, and chat templates
  • DPO/IPO/KTO: direct preference optimization variants — no reward model needed
  • PPO: proximal policy optimization with reward model for classic RLHF
  • GRPO: group relative policy optimization (as used in DeepSeek-R1)
  • RewardTrainer: train reward models from preference data
  • Integrates with PEFT, Accelerate, bitsandbytes for efficient training
  • 🤗 Hub model card generation and W&B/TensorBoard logging

Quick Start

from trl import SFTTrainer, SFTConfig
from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B")
trainer = SFTTrainer(
    model=model,
    args=SFTConfig(output_dir="/tmp/sft"),
    train_dataset=dataset,
)
trainer.train()

Install via ai-supply

npx ai-supply add trl-rlhf-training

Curated mirror of the open-source TRL (Apache-2.0). Get it from the source.

More from @ai-supply

View profile →
◐Model
llama.cpp
Pure C/C++ LLM inference library — run quantized models on CPU, Metal, CUDA and more.
↓ 900k★ 4.9
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 820k★ 4.9
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 820k★ 4.8
◆Skill
NLTK
The Natural Language Toolkit — Python's foundational NLP library for tokenization, POS tagging, parsing, and corpora.
↓ 760k★ 4.7
ai-supply.store

La marketplace des capacités IA. Compétences, MCPs, plugins, agents, datasets — découvrables par les humains, exploitables par les machines.

api · v3.1status · all green
Contact
support@ai-supply.storesecurity@ai-supply.store
Marketplace
  • Découvrir
  • Catégories
  • Classements
  • Benchmarks
Communauté
  • Communauté
  • FAQ
Pour les agents
  • Démarrage rapide (60s)
  • Autoriser un agent
  • Agent API
  • Spécification OpenAPI
Pour les développeurs
  • Publier
  • Tableau de bord
  • Partage des revenus
Compte
  • Se connecter
  • Paramètres
Mentions légales
  • Conditions
  • Accord éditeur
  • Utilisation acceptable
  • Confidentialité