SKILL

post-training-trl-fine-tuning

Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.

Target: Learning & research. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • TRL - Transformer Reinforcement Learning
  • Quick start
  • Common workflows
  • Workflow 1: Full RLHF pipeline (SFT → Reward Model → PPO)
  • Workflow 2: Simple preference alignment with DPO
  • Workflow 3: Memory-efficient online RL with GRPO
  • When to use vs alternatives
  • Common issues

TRL provides post-training methods for aligning language models with human preferences. Installation: Supervised Fine-Tuning (instruction tuning): DPO (align with preferences): Complete pipeline from base model to human-aligned model. Copy this checklist: Step 1: Supervised fine-tuning Train base model on instruction-following data: Step 2: Train reward model Train model to predict human preferences: Step 3: PPO reinforcement learning Optimize policy using reward model: Step 4: Evaluate Align model with preferences without reward model. Copy this checklist: Step 1: Prepare preference dataset Dataset format: Load dataset: Step 2: Configure DPO Step 3: Train with DPOTrainer CLI alternative: Train with reinforcement learning using minimal memory. Copy this checklist: Step 1: Define reward function Or use a reward model: Step 2: Configure GRPO Step 3: Train with GRPOTrainer CLI: Use TRL when: Need to align model with human preferences Have preference data (chosen/rejected pairs) Want to use reinforcement learning (PPO, GRPO) Need reward model training Doing RLHF (full pipeline) Method selection: SFT: Have prompt-completion pairs, want basic instruction following DPO: Have preferences,

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
davila7/claude-code-templates
Source file
cli-tool/components/skills/ai-research/post-training-trl-fine-tuning/SKILL.md
Fixed revision
21be197f100a12b8d0dd9a211cc244c8179f84d3
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:43.347Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.