hugging-face-model-trainer

hugging-face-model-trainer is a skill for Claude Code, Codex from ihatesea69/HieuNghi-AI-Skills. It costs 131 tokens per session (7,031 once invoked), scanned A, a copy of hugging-face-model-trainer, MIT.

A guide for training or fine-tuning language models on Hugging Face cloud GPUs using TRL, a library for training models with methods such as supervised fine-tuning and preference optimization. It also covers saving results and converting models for local use.

In plain words
What is it for?
Use it to run SFT, DPO, GRPO, or reward-model training on Hugging Face Jobs and convert trained models to GGUF format.
Why use it?
It removes the need to prepare and manage a local GPU setup for these training jobs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Claude Code.

Good fit Use it to run SFT, DPO, GRPO, or reward-model training on Hugging Face Jobs and convert trained models to GGUF format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ihatesea69/hieunghi-ai-skills/hugging-face-model-trainer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ihatesea69/HieuNghi-AI-Skills --skill hugging-face-model-trainer
Clone the repo
git clone --depth 1 https://github.com/ihatesea69/HieuNghi-AI-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hugging-face-model-trainer

README.md
[![agentmods](https://agentmods.dev/badge/skills/ihatesea69/hieunghi-ai-skills/hugging-face-model-trainer/github.svg)](https://agentmods.dev/skills/ihatesea69/hieunghi-ai-skills/hugging-face-model-trainer)
Your own site
<a href="https://agentmods.dev/skills/ihatesea69/hieunghi-ai-skills/hugging-face-model-trainer"><img src="https://agentmods.dev/badge/skills/ihatesea69/hieunghi-ai-skills/hugging-face-model-trainer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hugging-face-model-trainer

Your own site · 80×15
<a href="https://agentmods.dev/skills/ihatesea69/hieunghi-ai-skills/hugging-face-model-trainer"><img src="https://agentmods.dev/badge/skills/ihatesea69/hieunghi-ai-skills/hugging-face-model-trainer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,031 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.07031
Opus 5 $0.00066 $0.03515
Sonnet 5 $0.00026 $0.01406
Haiku 4.5 $0.00013 $0.00703

Measured 9d ago against content hash 4a0d1a94f875, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hugging-face-model-trainer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/convert_to_gguf.py, scripts/dataset_inspector.py, scripts/estimate_cost.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

98% identical to hugging-face-model-trainer — 1,424 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

huggingface_skills/hugging-face-model-trainer/SKILL.md · 719 lines

How it starts

The opening of the file, as written. The whole thing — 719 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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 deployment (Ollama, LM Studio, llama.cpp)
  • Ensure trained models are permanently saved to the Hub
  • Use modern workflows with optimized defaults

When to Use Unsloth

Use Unsloth (references/unsloth.md) instead of standard TRL when:

  • Limited GPU memory - Unsloth uses ~60% less VRAM
  • Speed matters - Unsloth is ~2x faster
  • Training large models (>13B) - memory efficiency is critical
  • Training Vision-Language Models (VLMs) - Unsloth has FastVisionModel support

See references/unsloth.md for complete Unsloth documentation and scripts/unsloth_sft_example.py for a production-ready training script.

Key Directives

When assisting with training jobs:

  1. ALWAYS use hf_jobs() MCP tool - Submit jobs using hf_jobs("uv", {...}), NOT bash trl-jobs commands. The script parameter accepts Python code directly. Do NOT save to local files unless the user explicitly requests it. Pass the script content as a string to hf_jobs(). If user asks to "train a model", "fine-tune", or similar requests, you MUST create the training script AND submit the job immediately using hf_jobs().

Read the full file on GitHub · 719 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 719 lines · 131 tokens per session scan A 4a0d1a94f875

Subscribe to this mod's changes

hugging-face-model-trainer is a skill published in the GitHub repository ihatesea69/HieuNghi-AI-Skills (3 stars, last pushed 6mo ago), licensed MIT. It adds 131 tokens to every session and 7,031 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to hugging-face-model-trainer, differing in 1,424 lines, and is treated as a copy.

Related

Other skills, from other repositories

render-html

A command-line tool for managing GPU jobs on the Qizhi computing platform, a service for running machine-learning workloads on shared graphics processors.

wanshuiyin/Auto-claude-code-research-in-sleep · 92 tokens

serverless-modal

Run GPU workloads on Modal — training, fine-tuning, inference, batch processing. Zero-config serverless: no SSH, no Docker, auto scale-to-zero. Use when user says "modal run", "modal training", "modal inference", "deploy to modal", "need a GPU", "run on modal", "serverless GPU", or needs remote GPU compute.

wanshuiyin/Auto-claude-code-research-in-sleep · 79 tokens

qzcli

A command-line tool for managing GPU compute jobs on the Qizhi platform, a service for running machine-learning workloads on shared GPUs.

wanshuiyin/Auto-claude-code-research-in-sleep · 82 tokens

deepspeed

Expert guidance for distributed training with DeepSpeed - ZeRO optimization stages, pipeline parallelism, FP16/BF16/FP8, 1-bit Adam, sparse attention.

davila7/claude-code-templates · 38 tokens

ultralytics-platform

This skill should be used when user asks to "upload my model to Ultralytics Platform", "push this run to the platform", "upload a dataset to platform", "download a dataset from platform", "search platform datasets", "start cloud training", "train on platform GPUs", "export a model on platform", "deploy a model…

fcakyon/claude-codex-settings · 112 tokens

vllm

Operate, configure, benchmark, and troubleshoot vLLM inference servers: Docker and Kubernetes deployment, quantization-aware model configuration (tensor parallelism, KV cache), OpenAI-compatible API serving, throughput and latency benchmarking, continuous batching tuning, GPU operation, and upgrade/rollback. Use when…

magnus919/agent-skills · 196 tokens