Agent skill · Data & Analytics

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 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/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

Directs the agent to train or fine-tune language models using TRL on Hugging Face Jobs infrastructure, covering SFT, DPO, GRPO, reward modeling, and GGUF conversion for local deployment. Includes guidance on TRL Jobs package, UV scripts with PEP 723 format, dataset preparation and validation, hardware selection, cost estimation, Trackio monitoring, Hub authentication, and model persistence. Invoked for tasks involving cloud GPU training, GGUF conversion, or training on Hugging Face Jobs.

How it works

  • Requires using the hf_jobs() MCP tool to submit training jobs with an inline script, not bash trl-jobs commands. If the user requests training, you must create the training script and submit via hf_jobs().
  • Every training script must include Trackio for real-time monitoring and should reference templates in scripts/ as starting points.
  • Provide job details after submission: job ID, monitoring URL, estimated time; allow the user to request status checks later.
  • Offer templates for various TRL methods (SFT, DPO, GRPO) and for GGUF conversion to local deployment targets (Ollama, LM Studio, llama.cpp).
  • Use example scripts like scripts/train_sft_example.py or scripts/train_dpo_example.py as templates.
  • For local cost estimates, use scripts/estimate_cost.py with provided model, dataset, and hardware parameters.

When to use it

Used 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 deployment
  • Ensure trained models are permanently saved to the Hub
  • Follow modern workflows with optimized defaults

What it can touch

  • Tools: hf_jobs() MCP tool
  • Scripts: templates in scripts/ (e.g., train_sft_example.py, train_dpo_example.py)
  • Dependencies and configurations: SFTConfig, hub_model_id, push_to_hub, and HF_TOKEN via secrets in job config
  • Data and hubs: datasets loaded via datasets.load_dataset(), and push to Hub viaHub authentication and HUB tokens

Caveats

  • Jobs run asynchronously and can take hours; must push results to the Hub to persist data
  • Ephemeral training environment; all files are deleted when the job ends unless pushed to Hub
  • Timeout must be sufficiently long to accommodate training time; default is 30 minutes and is insufficient for typical runs
  • Requires HF_TOKEN with write permissions and proper secrets in job config
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 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 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