huggingface-llm-trainer

huggingface-llm-trainer is a skill for Claude Code from waybarrios/opencode-power-pack. It costs 65 tokens per session (3,133 once invoked), scanned A, original, MIT.

A training aid for fine-tuning language models on Hugging Face Jobs, a managed cloud service for running model-training work. It supports TRL and Unsloth methods, including supervised fine-tuning, preference-based training, reinforcement learning, and reward-model training, plus GGUF conversion.

In plain words
What is it for?
Use it to train or fine-tune language models in the cloud, choose between supported training methods, submit jobs through the Hugging Face CLI or configured MCP tool, and save results to the Hugging Face Hub.
Why use it?
It removes the need to set up local GPUs for these training jobs and supports several ways to adapt a language model. Unsloth is suggested when GPU memory, speed, larger models, or vision-language training are important.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the opencode-power-pack plugin — 54 skills shipped together

Good fit Use it to train or fine-tune language models in the cloud, choose between supported training methods, submit jobs through the Hugging Face CLI or configured MCP tool, and save results to the Hugging Face Hub.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/waybarrios/opencode-power-pack/huggingface-llm-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 waybarrios/opencode-power-pack --skill huggingface-llm-trainer
Clone the repo
git clone --depth 1 https://github.com/waybarrios/opencode-power-pack

Made for: Claude Code.

Or install opencode-power-pack, the plugin that ships this one along with the rest of its 54 skills.

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 huggingface-llm-trainer

README.md
[![agentmods](https://agentmods.dev/badge/skills/waybarrios/opencode-power-pack/huggingface-llm-trainer.svg)](https://agentmods.dev/skills/waybarrios/opencode-power-pack/huggingface-llm-trainer)
Your own site
<a href="https://agentmods.dev/skills/waybarrios/opencode-power-pack/huggingface-llm-trainer"><img src="https://agentmods.dev/badge/skills/waybarrios/opencode-power-pack/huggingface-llm-trainer.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,133 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 121
    uvx/uv tool run commands without ==version create a rug-pull risk.
    Fix: Pin the version: uvx package-name==1.2.3
How audits are shown
Origin original No closer match found 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.00065 $0.03133
Opus 5 $0.00032 $0.01566
Sonnet 5 $0.00013 $0.00627
Haiku 4.5 $0.00006 $0.00313

Measured 8d ago against content hash 3f1884ed1b05, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

huggingface-llm-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 8d ago.

The scan reads SKILL.md. This mod also ships 8 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.

skills/huggingface-llm-trainer/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 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

See references/training_methods.md for method overviews and selection guidance.

When to Use Unsloth

Use Unsloth (references/unsloth.md) instead of standard TRL when GPU memory is limited (~60% less VRAM), speed matters (~2x faster), training large models (>13B), or training Vision-Language Models (Unsloth has FastVisionModel support). See scripts/unsloth_sft_example.py for a production-ready training script.

Key Directives

  1. Submit jobs via hf jobs uv run (CLI) or the hf_jobs() MCP tool if the Hugging Face MCP server is configured — pass the training script inline, don't save to a local file unless the user explicitly requests it. If the user asks to "train a model" or "fine-tune", create the training script AND submit the job immediately.
  2. Always include Trackio for real-time monitoring — use scripts/ templates.
  3. Provide job details after submission: job ID, monitoring URL, estimated time; note the user can request status checks later.
  4. Use example scripts as templates: scripts/train_sft_example.py, scripts/train_dpo_example.py, etc.

Local Script Execution

Repository scripts use PEP 723 inline dependencies. Run them with uv run:

uv run scripts/estimate_cost.py --help
uv run scripts/dataset_inspector.py --help

Prerequisites Checklist

Account & Authentication:

  • Hugging Face account with Pro/Team/Enterprise plan (Jobs require a paid plan); authenticated login.
  • HF_TOKEN for Hub push is CRITICAL — the training environment is ephemeral, so results are lost unless pushed to the Hub. Token must have write permissions. Pass secrets={"HF_TOKEN": "$HF_TOKEN"} in the job config.

Read the full file on GitHub · 205 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. 8d ago First seen · 205 lines · 65 tokens per session scan A 3f1884ed1b05

Subscribe to this mod's changes

huggingface-llm-trainer is a skill published in the GitHub repository waybarrios/opencode-power-pack (495 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 3,133 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

shipkit-prompt-audit

Audit LLM prompt pipeline architecture — decomposition, parallelization, chain integrity, schema validation, fallback paths. Finds structural issues no linter catches.

stefan-stepzero/shipkit · 36 tokens

review-loop

Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…

sangrokjung/claude-forge · 100 tokens

memstack-seo-ai-search-visibility

Use this skill when the user says 'AI search', 'AI visibility', 'ChatGPT ranking', 'Perplexity optimization', 'GEO', 'generative engine optimization', or needs to optimize content for AI-powered search engines and LLM citations. Do NOT use for traditional SEO audits or Google Ads.

cwinvestments/memstack · 71 tokens

ln-11-plan-reviewer

Reviews an implementation plan against repository evidence before execution; identifies missing decisions and risks. Not for completed-code review.

levnikolaevich/claude-code-skills · 29 tokens

ln-25-persistence-auditor

Audits queries, transactions, data-path costs, and persistence resource lifetimes. Not for general performance tuning.

levnikolaevich/claude-code-skills · 31 tokens

ln-71-system-design-baseline-builder

Creates architecture-driving requirements and constraints before design. Not for target design, plan review, or implementation audits.

levnikolaevich/claude-code-skills · 30 tokens