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...
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
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
# 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 Execution
- Prerequisites Checklist
- ✅ Account & Authentication
- ✅ Dataset Requirements
- ⚠️ Critical Settings
- Asynchronous Job Guidelines
- Action Required
- Ground Rules
- After Submission
- Quick Start: Three Approaches
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
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.