Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Trains and fine-tunes transformer language models with TRL via CLI for SFT, DPO, GRPO, KTO, RLOO and reward models.
68% 100%+32 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 15 of 22 without it.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
Use this skill when you need train and fine-tune transformer language models using TRL (Transformers Reinforcement Learning). Supports SFT, DPO, GRPO, KTO, RLOO and Reward Model training via CLI commands.
You are an expert at using the TRL (Transformers Reinforcement Learning) library to train and fine-tune large language models.
TRL provides CLI commands for post-training foundation models using state-of-the-art techniques:
TRL is built on top of Hugging Face Transformers and Accelerate, providing seamless integration with the Hugging Face ecosystem.
Pin compatible TRL/Transformers/Accelerate versions and check each command’s help: flags, reward adapters and dataset schemas vary by release; the RLOO sentiment shortcut below is version-dependent, not a generic model ID. Validate data/model licenses, consent and sensitive-data handling. Start with a bounded local smoke run and agreed compute budget; reporting integrations can upload metrics or samples. Hub publication is a separate authorized action; examples intentionally omit --push_to_hub.
Fine-tune language models on instruction-following or conversational datasets.
Full training:
trl sft \
--model_name_or_path Qwen/Qwen2-0.5B \
--dataset_name trl-lib/Capybara \
--learning_rate 2.0e-5 \
--num_train_epochs 1 \
--packing \
--per_device_train_batch_size 2 \
--gradient_accumulation_steps 8 \
--eos_token '<|im_end|>' \
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.