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
npx skills add majiayu000/claude-skill-registry --skill hugging-face-model-trainer-ihatesea69-hieunghi-ai-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
This skill trains or fine-tunes language models using TRL on Hugging Face Jobs, covering SFT, DPO, GRPO, and Reward Modeling, plus GGUF conversion for local deployment. It ensures training results are saved to the Hub, 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. It is meant for tasks involving cloud GPU training and Hugging Face Jobs infrastructure, and for converting trained models to GGUF for local deployment.
How it works
The skill directs the agent to use the hf_jobs() MCP tool to submit training jobs with inline Python scripts (not saving to local files unless requested). Each training script must include Trackio monitoring and push-to-hub configuration. It provides templates and references for using UV inline dependencies, and for TRL-maintained scripts or TRL Jobs, with example code snippets showing model loading, dataset handling, trainer configuration (SFTTrainer/SFTConfig, DPO, etc.), and hub push settings. It specifies that the script is submitted via hf_jobs("uv", {"script": "..."}) and that the tool requires a flavor, timeout, and secrets with HF_TOKEN. It instructs to report the Job ID, monitoring URL, estimated time, and to use templates from scripts/ as starting points. It also outlines prerequisites (HF token, dataset format, timeout, and hub push) and the asynchronous nature of jobs, including how to monitor progress.
When to use it
Use this skill when users want to fine-tune or train language models on cloud GPUs using TRL methods (SFT, DPO, GRPO, Reward Modeling), run training jobs on Hugging Face Jobs, or convert trained models to GGUF for local deployment. It is also applicable when users need guidance on datasets, authentication, and pushing results to the Hub.
What it can touch
The skill requires using the hf_jobs() MCP tool via inline Python scripts to submit UV-based training jobs, with Trackio included. It references dependencies and scripts located under scripts/ (e.g., scripts/train_sft_example.py, scripts/train_dpo_example.py) as templates, and mentions pushing to Hub with hub_model_id and HF_TOKEN via secrets. It also notes that local script dependencies can be installed via pip install -r requirements.txt in Local Script Dependencies, and that the GitHub/TRL sources may be used as script sources.
Caveats
The training environment is ephemeral and results must be pushed to the Hub to persist. Timeouts must be adjusted to exceed expected training time. Hub authentication requires HF_TOKEN and write permissions. The guidance emphasizes asynchronous execution and monitoring responsibilities rather than real-time polling.
# 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
- Overview
- When to Use This Skill
- When to Use Unsloth
- Key Directives
- Local Script Dependencies
- Prerequisites Checklist
- ✅ Account & Authentication
- ✅ Dataset Requirements
- ⚠️ Critical Settings
- Asynchronous Job Guidelines
- Action Required
- Ground Rules
- After Submission
- Quick Start: Three Approaches
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
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-ihatesea69-hieunghi-ai-skills --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.
