Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

hugging-face-model-trainer

Skill by patchy631

Trains and fine-tunes language models with TRL on Hugging Face Jobs using cloud GPUs. Covers SFT, DPO, GRPO, reward modeling and GGUF conversion for local deployment.

  • Score 89
  • 42k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install hugging-face-model-trainer

Built from the published package, never by AI.

git clone --depth 1 https://github.com/patchy631/ai-engineering-hub /tmp/ai-engineering-hub && mkdir -p ~/.claude/skills && cp -r /tmp/ai-engineering-hub/hugging-face-skills/skills/hugging-face-model-trainer ~/.claude/skills/hugging-face-model-trainer

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install hugging-face-model-trainer in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Hugging Face Model Trainer is a skill that guides an AI assistant through training or fine-tuning language models with TRL on Hugging Face Jobs. It covers SFT, DPO, GRPO and reward modeling, plus GGUF conversion for local deployment. The skill states that training runs on managed cloud GPUs, so no local GPU setup is needed, and that results are saved to the Hugging Face Hub.

The assistant is told to submit jobs with the hf_jobs() tool using inline UV scripts that follow PEP 723. Every script should include Trackio for monitoring, and Hub push must be enabled with an HF_TOKEN secret. The skill also covers dataset validation, hardware selection, cost estimation and Hub authentication. It is aimed at users who want cloud GPU training on a paid Hugging Face plan.

Written from the project's SKILL.md and checked against it.

What it can do

  • hf_jobsSubmits training jobs to Hugging Face Jobs as inline UV scripts.
  • Training methodsCovers SFT, DPO, GRPO and reward modeling with TRL.
  • GGUF conversionConverts trained models to GGUF for Ollama, LM Studio or llama.cpp.
  • Dataset validationChecks dataset format before GPU training starts.
  • Hardware and costHelps select hardware and estimate training cost with estimate_cost.py.
  • Trackio monitoringAdds real-time Trackio monitoring to training scripts.
  • Hub persistencePushes trained models to the Hugging Face Hub so results are kept.
  • hf_doc_searchSearches TRL documentation for method details.

What you need

  • Hugging Face account with Pro, Team or Enterprise plan
  • HF_TOKEN with write permissions
  • pip to install local script dependencies

Try asking

  • Fine-tune Qwen2.5-0.5B with SFT on trl-lib/Capybara using a10g-large
  • Train a DPO model from my preference dataset on Hugging Face Jobs
  • Convert my fine-tuned model to GGUF for use in Ollama

Good to know

  • Hugging Face Jobs require a paid plan.
  • The default 30 minute timeout is too short for most training; 1 to 2 hours is recommended.
  • Local script file paths do not work; scripts must be inline code or hosted at a URL.
  • The training environment is ephemeral, so models must be pushed to the Hub.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: hugging-face-skills/skills/hugging-face-model-trainer/SKILL.md, hugging-face-skills/skills/hugging-face-model-trainer/scripts/convert_to_gguf.py, hugging-face-skills/skills/hugging-face-model-trainer/scripts/dataset_inspector.py, hugging-face-skills/skills/hugging-face-model-trainer/scripts/estimate_cost.py, hugging-face-skills/skills/hugging-face-model-trainer/scripts/train_dpo_example.py, hugging-face-skills/skills/hugging-face-model-trainer/scripts/train_grpo_example.py, hugging-face-skills/skills/hugging-face-model-trainer/scripts/train_sft_example.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md27 KB
  • references/gguf_conversion.md10 KB
  • references/hardware_guide.md7 KB
  • references/hub_saving.md9 KB
  • references/reliability_principles.md11 KB
Show all 15 files
  • references/trackio_guide.md6 KB
  • references/training_methods.md5 KB
  • references/training_patterns.md6 KB
  • references/troubleshooting.md9 KB
  • scripts/convert_to_gguf.py10 KB
  • scripts/dataset_inspector.py16 KB
  • scripts/estimate_cost.py5 KB
  • scripts/train_dpo_example.py3 KB
  • scripts/train_grpo_example.py2 KB
  • scripts/train_sft_example.py3 KB

Alternatives to hugging-face-model-trainer

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

hugging-face-model-trainer: common questions

Do I need a local GPU to use this skill?

No. The source says models train on cloud GPUs on Hugging Face Jobs, so no local GPU setup is required.

Where are trained models saved?

They are pushed to the Hugging Face Hub when push_to_hub is enabled and an HF_TOKEN secret is passed to the job.

Which training methods does it support?

The source lists SFT, DPO, GRPO and reward modeling with TRL, plus GGUF conversion for local deployment.

How do I install hugging-face-model-trainer?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is hugging-face-model-trainer free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is hugging-face-model-trainer safe to use?

It scores 89 of 100. Grades: maintenance B, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to hugging-face-model-trainer?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

hugging-face-model-trainer Install

Add to stack

Loading.