Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Trains or fine-tunes language and vision models with TRL or Unsloth on Hugging Face Jobs, covering SFT, DPO, GRPO and GGUF export.
Use this skill ↓52% 96%+43 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 12 of 23 without it.
3 of 3 safety checks passed
Not used yet
Train language models using TRL (Transformer Reinforcement Learning) on fully managed Hugging Face infrastructure. No local GPU setup required — models train on cloud GPUs and results are automatically saved to the Hugging Face Hub.
TRL provides multiple training methods:
See references/training_methods.md for method overviews and selection guidance.
Use Unsloth (references/unsloth.md) instead of standard TRL when GPU memory is limited (~60% less VRAM), speed matters (~2x faster), training large models (>13B), or training Vision-Language Models (Unsloth has FastVisionModel support). See scripts/unsloth_sft_example.py for a production-ready training script.
hf jobs uv run (CLI) or the hf_jobs() MCP tool if the Hugging Face MCP server is configured — pass the training script inline, don't save to a local file unless the user explicitly requests it. If the user asks to "train a model" or "fine-tune", create the training script AND submit the job immediately.scripts/ templates.scripts/train_sft_example.py, scripts/train_dpo_example.py, etc.Repository scripts use PEP 723 inline dependencies. Run them with uv run:
uv run scripts/estimate_cost.py --help
uv run scripts/dataset_inspector.py --help
Account & Authentication:
secrets={"HF_TOKEN": "$HF_TOKEN"} in the job config.Dataset Requirements:
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.