Agent skill · AI & Agents

hugging-face-model-trainer

Train or fine-tune language and vision models using TRL (Transformer Reinforcement Learning) or Unsloth with Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs...

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorships scriptsMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill hugging-face-model-trainer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 19
SKILL.md size: 29 KB
Bundled scripts: yes
Path: skills/hugging-face-model-trainer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Instructs the agent to train or fine-tune language and vision models using TRL or Unsloth on Hugging Face Jobs infrastructure, including SFT, DPO, GRPO, and reward modeling training methods, plus GGUF conversion for local deployment, with guidance on saving results to the Hub.

How it works

The skill directs the agent to:

  • Use Hugging Face Jobs to run training without local GPUs, with results pushed to the Hub.
  • Employ TRL methods: SFT, DPO, GRPO, and reward modeling, and optionally convert to GGUF for local deployment.
  • Choose between UV inline-script training (recommended in Claude Code) or TRL-maintained scripts, submitting jobs via hf_jobs() with a Python script string, including Trackio monitoring and Hub push configuration.
  • Include prerequisites like HF_TOKEN, push_to_hub, hub_model_id, and datasets formatted for the chosen method.
  • Provide templates and templates references for scripts, and emphasize asynchronous job behavior, status checks, and monitoring links.
  • Offer guidance on when to use Unsloth, and how to select hardware and timeout settings, while enforcing Hub persistence.

When to use it

Use this skill when users want to fine-tune or train language or vision models on cloud GPUs via Hugging Face Jobs, applying TRL methods (SFT, DPO, GRPO) or reward modeling, and when GGUF conversion and Hub persistence are required.

What it can touch

  • Tools: claude-code, codex, cursor
  • Requires: HF_TOKEN in secrets for Hub push
  • Script execution via hf_jobs() with an inline script string

Caveats

  • Risk: critical
  • Environment is ephemeral; must push results to the Hub to avoid loss
  • Requires paid Hugging Face plan (Jobs)
  • Timeout must accommodate training duration; default of 30 minutes is not adequate
  • Script submission uses Trackio for monitoring; status checks are user-initiated
From the SKILL.md

# TRL Training on Hugging Face Jobs ## Overview 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:** - **SFT** (Supervised Fine-Tuning) - Standard instruction tuning - **DPO** (Direct Preference Optimization) - Alignment from preference data - **GRPO** (Group Relative Policy Optimization) - Online RL training - **Reward Modeling** - Train reward models for RLHF **For detailed TRL method documentation:** ```python hf_doc_search("your query", product="trl") hf_doc_fetch("https://huggingface.co/docs/trl/sft_trainer") # SFT hf_doc_fetch("https://huggingface.co/docs/trl/dpo_trainer") # DPO # etc. ``` **See also:** `references/training_methods.md` for method overviews and selection guidance ## When to Use This Skill Use this skill when users want to: - Fine-tune language models on cloud GPUs without local infrastructure - Train with TRL methods (SFT, DPO, GRPO, etc.) - Run training jobs on Hugging Face Jobs infrastructure - Convert trained models to GGUF for local deplo

What's inside
Steps it walks through
  1. Overview
  2. When to Use This Skill
  3. When to Use Unsloth
  4. Key Directives
  5. Local Script Execution
  6. Prerequisites Checklist
  7. ✅ Account & Authentication
  8. ✅ Dataset Requirements
  9. ⚠️ Critical Settings
  10. Asynchronous Job Guidelines
  11. Action Required
  12. Ground Rules
  13. After Submission
  14. Quick Start: Three Approaches
Ships with 18 files
  • references/gguf_conversion.md
  • references/hardware_guide.md
  • references/hub_saving.md
  • references/local_training_macos.md
  • references/reliability_principles.md
  • references/trackio_guide.md
  • references/training_methods.md
  • references/training_patterns.md
  • references/troubleshooting.md
  • references/unsloth.md
  • scripts/convert_to_gguf.py
  • scripts/dataset_inspector.py
  • scripts/estimate_cost.py
  • scripts/hf_benchmarks.py
  • scripts/train_dpo_example.py
  • scripts/train_grpo_example.py
  • scripts/train_sft_example.py
  • scripts/unsloth_sft_example.py
Commands it runs
uv run scripts/estimate_cost.py --help
uv run scripts/dataset_inspector.py --help
hf repos create my-training-scripts --type model
hf upload my-training-scripts ./train.py train.py
hf jobs uv run --flavor a10g-large --timeout 2h --secrets HF_TOKEN "https://example.com/train.py"
hf jobs run uv "https://example.com/train.py" --flavor a10g-large
hf jobs uv run "https://example.com/train.py" --flavor a10g-large
hf jobs uv run --secret HF_TOKEN "https://example.com/train.py"
hf jobs uv run \
hf jobs ps                        # List all jobs
More from agentic-awesome-skills
All skills →
About this skill
What does the hugging-face-model-trainer skill do?

Train or fine-tune language and vision models using TRL (Transformer Reinforcement Learning) or Unsloth with Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs...

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill hugging-face-model-trainer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going