Agent skill · Data & Analytics

hugging-face-model-trainer

This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on 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 package, UV scripts with PEP 723 format, dataset preparation and validation, hardware selection, cost estimation, Trackio monitoring, Hub authentication, and model persistence. Should be invoked for tasks involving cloud GPU training, GGUF conversion, or when users mention training on Hugging Face

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --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: 2
SKILL.md size: 27 KB
Bundled scripts: none
Path: skills/ai-ml/hugging-face-model-trainer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

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 models using TRL on Hugging Face Jobs infrastructure, covering SFT, DPO, GRPO, and Reward Modeling, plus GGUF conversion for local deployment. Ensures training results are saved to the Hub and uses Trackio for monitoring.

How it works

  • Always use the hf_jobs() MCP tool to submit training jobs, passing a Python script via the script parameter as a string; do not save to local files unless requested. If the user asks to train or fine-tune, create the training script and submit immediately using hf_jobs().
  • Include Trackio in every training script for real-time monitoring, using templates from scripts/ as references.
  • Provide job details after submission: job ID, monitoring URL, estimated time, and note that status checks can be requested later.
  • Reference example templates such as scripts/train_sft_example.py and scripts/train_dpo_example.py as starting points.
  • For local cost estimation, use scripts/estimate_cost.py with appropriate model and dataset parameters.

When to use it

Use this skill when users want to fine-tune on cloud GPUs with TRL methods (SFT, DPO, GRPO, Reward Modeling), run training jobs on Hugging Face Jobs infrastructure, or convert trained models to GGUF for local deployment, including pushing results to the Hub.

What it can touch

  • hf_jobs() MCP tool to submit training scripts inline (no local file saves unless requested)
  • Training scripts that include Trackio and Hub push configuration
  • Hub access via HF_TOKEN provided in secrets for authentication

Caveats

  • Training is asynchronous and can take hours; ensure timeout is sufficient (default 30 minutes is too short).
  • Ephemeral environment requires pushing to Hub (must set push_to_hub and hub_model_id; secrets HF_TOKEN needed).
  • Requires HF_TOKEN with write permissions and proper hub_model_id in configuration.
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. Key Directives
  4. Local Script Dependencies
  5. Prerequisites Checklist
  6. ✅ Account & Authentication
  7. ✅ Dataset Requirements
  8. ⚠️ Critical Settings
  9. Asynchronous Job Guidelines
  10. Action Required
  11. Ground Rules
  12. After Submission
  13. Quick Start: Three Approaches
  14. Sequence Length Configuration
Ships with 1 file
  • metadata.json
Commands it runs
pip install -r requirements.txt
huggingface-cli repo create my-training-scripts --type model
huggingface-cli 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
hf jobs logs <job-id>             # View logs
More from claude-skill-registry
All skills →
About this skill
What does the hugging-face-model-trainer skill do?

This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on 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 package, UV scripts with PEP 723 format, dataset preparation and validation, hardware selection, cost estimation, Trackio monitoring, Hub authentication, and model persistence. Should be invoked for tasks involving cloud GPU training, GGUF conversion, or when users mention training on Hugging Face

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --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 majiayu000/claude-skill-registry, a repository with 534 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