trl-training
Skill by sickn33
Trains and fine-tunes transformer language models with the TRL library through its CLI commands. Covers SFT, DPO, GRPO, RLOO and reward model training for ML practitioners.
Install trl-training
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/trl-training ~/.claude/skills/trl-trainingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agentic-awesome-skills/skills/trl-training ~/.gemini/antigravity-cli/skills/trl-trainingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
TRL is a skill that guides an AI assistant through training and fine-tuning transformer language models with the TRL library (Transformers Reinforcement Learning). It covers the trl CLI commands for supervised fine-tuning (SFT), Direct Preference Optimization (DPO), Group Relative Policy Optimization (GRPO), RLOO and reward model training. The examples include LoRA adapters, YAML config files and multi-GPU or distributed training through Accelerate.
The skill also includes troubleshooting notes for out-of-memory errors, dataset and model loading, slow training and generation issues. It advises pinning compatible TRL, Transformers and Accelerate versions, checking each command's help, and starting with a bounded local smoke run. It is aimed at developers and ML practitioners who want to post-train language models. The source says Hub publication is a separate authorized action, and the examples omit --push_to_hub.
Written from the project's SKILL.md and checked against it.
What it can do
- Supervised fine-tuning (SFT)Fine-tunes models on instruction-following or conversational datasets with trl sft.
- Direct Preference Optimization (DPO)Aligns models using chosen and rejected preference pairs with trl dpo.
- GRPO trainingTrains models with reward functions or LLM-as-a-judge using trl grpo.
- RLOO trainingRuns online reinforcement learning where the model receives generation-based rewards via trl rloo.
- Reward model trainingTrains reward models to score text quality for RLHF with trl reward.
- LoRA adaptersEnables parameter-efficient training with the --use_peft and LoRA flags.
- YAML config filesStores training arguments in a config file that CLI flags can override.
- Distributed trainingUses Accelerate presets such as multi_gpu, fsdp2, zero2 and zero3 for multi-GPU runs.
What you need
- TRL, Transformers and Accelerate at compatible pinned versions
- Hugging Face Hub access for gated models, via hf auth login
- GPU hardware for the memory and multi-GPU options described
Try asking
- Use TRL to fine-tune Qwen2-0.5B on a conversational dataset with LoRA
- Write a trl dpo command for a preference dataset with a small model
- Create a YAML config for trl sft with gradient accumulation and eval steps
Good to know
- Command flags, reward adapters and dataset schemas vary by TRL release, so check each command's help.
- Validate data and model licenses, consent and sensitive-data handling before training.
- Reporting integrations such as trackio, wandb or tensorboard can upload metrics or samples.
- Examples omit --push_to_hub because Hub publication is a separate authorized action.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/trl-training/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB
Alternatives to trl-training
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
trl-training: common questions
Which training methods does TRL training support?
The skill covers SFT, DPO, GRPO, RLOO and reward model training through trl CLI commands. Each method has its own section with example commands.
Does the skill push trained models to the Hugging Face Hub?
No. The examples intentionally omit --push_to_hub, and the source says Hub publication is a separate authorized action.
Can I train with limited GPU memory?
The skill suggests LoRA via --use_peft, smaller batch sizes with more gradient accumulation, gradient checkpointing and smaller models or sequence lengths.
How do I install trl-training?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is trl-training free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is trl-training safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to trl-training?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
