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 — 55 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 55 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/github.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/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 huggingface-llm-trainer

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00026 $0.01253
Sonnet 5.5 $0.00013 $0.00627
Haiku 4.5 $0.00006 $0.00313

Measured 1mo ago against content hash 3f1884ed1b05, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (544 stars, last pushed 4d ago), licensed MIT. It adds 65 tokens to every session and 3,133 once invoked, about $0.0003 per session on Opus 5.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

answer-audit

Adversarially audit a RAG answer against the corpus it claims to cite. Use when asked to review, critique, sanity-check, or "give skeptical feedback on" an answer produced by Canon (or any retrieval-grounded system) — especially when the answer looks good. Assumes the answer is wrong until each claim is proven…

olehsvyrydov/AI-development-team · 78 tokens

prompt-optimization

Applies prompt repetition to improve accuracy for non-reasoning LLMs. Use when a Haiku or other non-reasoning agent misses details in a long prompt.

asklokesh/loki-mode · 39 tokens

constitutional-ai

Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.

synthetic-sciences/openscience · 58 tokens

instructor

Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream partial results with Instructor - battle-tested structured output library.

synthetic-sciences/openscience · 41 tokens

ai-elements

AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn/ui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.

build-with-dhiraj/ai-workflow-framework-portability-kit · 53 tokens

ai-gateway

Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.

build-with-dhiraj/ai-workflow-framework-portability-kit · 35 tokens