Data & Analysis trltransformer-trainingreinforcement-learningsupervised-fine-tuningdpogrpoloraaccelerate

TRL Language Model Trainer

Train and fine-tune transformer language models with TRL’s CLI for SFT, preference alignment, and reinforcement learning.

FollowSkills review · FSRS-2.0
Not recommended
48/ 100 5-point scale 2.4 / 5
Trust14 / 25 · 2.8/5

The evidence shows CLI guidance without malware or credential-theft behavior; however, examples include --push_to_hub, remote model/dataset loading, and hf auth login. Least privilege, data flows, confirmation, sensitive-data handling, dependency security, and rollback are not documented, so points are deducted.

Reliability8 / 20 · 2.0/5

The document covers SFT, DPO, GRPO, RLOO, reward-model training, configuration, and common troubleshooting, making the happy path plausible. It provides no committed tests for key commands, compatibility matrix, input validation, or diagnostically controlled failure behavior, so the static score remains limited.

Adaptability8 / 15 · 2.7/5

The audience and training scenarios are reasonably clear, with several post-training methods and single-node/distributed examples. Boundaries for dataset schemas, hardware, versions, and method selection are incomplete; Chinese-language support and mainland-China network reachability are not addressed, and core use depends on external Hugging Face services.

Convention8 / 15 · 2.7/5

The SKILL.md has clear frontmatter, progressive sections, examples, configuration, distributed-training guidance, troubleshooting, and best practices. Apache-2.0, version 1.0.0, and documentation links are present, but changelog, maintenance owner, update path, installation/dependency notes, FAQs, and known limitations are missing.

Effectiveness6 / 15 · 2.0/5

The command examples are directly useful as starting points, especially for LoRA, YAML configuration, and troubleshooting. However, the files contain no execution evidence, quality or evaluation completeness is not established, resource cost is only lightly discussed, and users must fill in important task-specific details, so the score is deducted.

Verifiability4 / 10 · 2.0/5

The revision includes auditable source documentation, an Apache license, and CI validating generated artifacts, providing limited evidence. The CI does not exercise TRL training paths, and there are no committed tests, real outputs, or independent corroboration; therefore static verifiability is modest.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 86cdeee824b7
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Before you use it
  • Before using --push_to_hub, confirm upload scope, credential permissions, repository visibility, and sensitive-data risks; rollback or revocation guidance is absent.
  • Verify installed TRL, Transformers, Accelerate, PEFT, hardware, and CLI versions before execution because examples may become invalid across releases.
  • Remote Hub access, authentication, large-model downloads, and external tracking may be constrained by network, account permissions, or resources; no mainland-China alternative is documented.
  • Validate dataset schemas, reward functions, memory use, and outputs in an isolated small run before long or distributed training.
Review evidence [1][2][3][4][5]
See the full review method →

What does this skill do, and when should you use it?

This skill helps agents use Hugging Face TRL to train and fine-tune transformer language models. It covers SFT, DPO, GRPO, RLOO, and reward-model training with executable CLI examples. It also documents LoRA adapters, YAML configuration, Accelerate-based distributed training, and troubleshooting guidance. It fits users who already have models and datasets and want a structured post-training workflow within the Hugging Face ecosystem.

Runs trl sft, trl dpo, trl grpo, trl kto, trl rloo, and trl reward; reads models and datasets from the Hugging Face Hub or local paths; configures learning rates, batch sizes, evaluation, LoRA, and output directories; launches reproducible runs from YAML files; uses Accelerate for multi-GPU, multi-node, FSDP, or DeepSpeed ZeRO training; pushes results to the Hub; and provides troubleshooting guidance for CUDA out-of-memory errors, dataset loading, model loading, slow training, and generation issues.

  1. A researcher turning a base model into an instruction-following or conversational model can use the SFT workflow and examples.
  2. An alignment engineer with chosen/rejected preference pairs can use the DPO command for direct preference optimization.
  3. A team evaluating generations with reward functions or an LLM judge can use GRPO.
  4. A researcher seeking online generation-based reinforcement learning with custom rewards can use RLOO.
  5. A team building an RLHF pipeline can use the reward command to train a reward model.
  6. A resource-constrained user or experimenter needing reproducibility can combine LoRA, YAML configuration, and Accelerate.

What are this skill's strengths and limitations?

Pros
  • Covers SFT, DPO, GRPO, RLOO, and reward-model training.
  • Includes full-training, LoRA, configuration-file, and distributed-training examples.
  • Provides troubleshooting guidance for memory, dataset, model-loading, speed, and generation issues.
  • Builds on TRL, Transformers, and Accelerate for Hugging Face ecosystem integration.
Limitations
  • Does not document how to install TRL, Transformers, or Accelerate.
  • Examples depend on particular models, datasets, hardware, and schemas, so direct reuse is not guaranteed for every project.
  • The SKILL.md provides no test suite, benchmark results, or platform validation evidence.
  • `kto` appears in the command metadata, but the body provides no corresponding usage example or explanation.

How do you install this skill?

The repository contains 26 separate skills. Following the README’s Codex method, copy or symlink skills/trl-training/ into a standard Codex .agents/skills location, such as $REPO_ROOT/.agents/skills or $HOME/.agents/skills. A compatible Agent Skills client can then discover its SKILL.md. The supplied source does not provide installation commands for TRL itself.

How do you use this skill?

After installation, give the coding agent a specific request such as: "Use the trl-training skill to fine-tune Qwen/Qwen2-0.5B on trl-lib/Capybara with SFT and LoRA." You can also run the documented commands directly, for example trl sft --config sft_config.yaml --learning_rate 1.0e-5. Before training, confirm the model, dataset schema, hardware, and appropriate training method.

FAQ

Does this skill include the training data or GPU resources?
No. It provides command and configuration guidance; users must supply models, datasets, compute, and authentication where needed.
What should I do if training runs out of CUDA memory?
The skill recommends reducing `--per_device_train_batch_size`, increasing gradient accumulation, enabling `--use_peft` or `--gradient_checkpointing`, or using a smaller model or shorter sequence length.
Is it suitable for preference-alignment training?
Yes. The body explicitly covers DPO, GRPO, RLOO, and reward-model training, but the dataset schema should be checked for the selected method.

More skills from this repository

All from huggingface/skills

Data & Analysis

Hugging Face LLM Trainer

Train, fine-tune, and preserve models on Hugging Face cloud GPUs.

Dev & Engineering

LoRA Space Demo Builder

Build and publish a tailored Gradio Space for a Hugging Face LoRA.

Data & Analysis

Hugging Face Local Evaluator

Run controlled inspect-ai or lighteval evaluations for Hugging Face Hub models on local hardware.

Data & Analysis

Sentence Transformers Training Assistant

Train retrieval, similarity, reranking, and sparse-search models with Sentence Transformers.

Data & Analysis

Transformers.js Inference Skill

Run Hugging Face models directly inside JavaScript applications.

Data & Analysis

Trackio Experiment Tracking

Log, monitor, and query machine-learning experiments with dashboards, diagnostic alerts, and automation-ready output.

Dev & Engineering

Hugging Face Hub CLI Skill

Give agents command-line control over Hugging Face Hub models, datasets, Spaces, jobs, and infrastructure.

Dev & Engineering

Gradio Interactive App Builder

Build Gradio web interfaces, machine-learning demos, and chat apps in Python.

Dev & Engineering

Hugging Face ZeroGPU Builder

Build dependable Gradio AI demos and GPU workloads on Hugging Face ZeroGPU.

Automation & Ops

AWS Context Discovery

Resolve the active AWS environment before any account operation.

Automation & Ops

SageMaker Deployment Planner

Choose a practical Amazon SageMaker deployment path for your model, traffic pattern, and latency needs.

Dev & Engineering

Hugging Face Spaces Builder

Build, deploy, debug, and maintain machine-learning apps on Hugging Face Spaces.

Automation & Ops

SageMaker Python Environment Setup

Build an isolated, version-aligned Python environment for SageMaker and AWS automation.

Data & Analysis

Hugging Face Dataset Explorer

Explore, query, and extract Hugging Face datasets through the Dataset Viewer API.

Dev & Engineering

Hugging Face Paper Research Assistant

Read AI papers and retrieve structured metadata from Hugging Face paper pages.

Automation & Ops

SageMaker Serving Image Selector

Choose a compatible SageMaker serving container and retrieve the current regional image URI for a Hugging Face model.

Automation & Ops

SageMaker Production Defaults

Deploy SageMaker real-time or async endpoints with autoscaling, CloudWatch alarms, and consistent tagging built in.

Data & Analysis

Hugging Face Model Memory Estimator

Estimate inference memory without downloading model weights.

Dev & Engineering

Hugging Face Local Model Runner

Choose compatible GGUF quantizations from Hugging Face and run them locally with llama.cpp.

Data & Analysis

Hugging Face Vision Trainer

Train detection, classification, and segmentation models on Hugging Face Jobs GPUs and persist the results to the Hub.

Related skills