hugging-face-model-trainer

Train and align language models with TRL on Hugging Face Jobs.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/pingqLIN/UniText --skill hugging-face-model-trainer-pingqlin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hugging-face-model-trainer
Source: https://github.com/pingqLIN/UniText/tree/main/runtime/skills/hugging-face-model-trainer
Command: npx skills add https://github.com/pingqLIN/UniText --skill hugging-face-model-trainer-pingqlin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires trl>=0.12.0, peft>=0.7.0, transformers>=4.36.0, accelerate>=0.24.0, trackio, datasets, transformers==4.57.3, huggingface_hub[hf_transfer], tensorboard, unsloth, trl==0.22.2, torch>=2.0.0, sentencepiece>=0.1.99, protobuf>=3.20.0, numpy, gguf, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Train and align language models using Transformer Reinforcement Learning (TRL) on Hugging Face Jobs, enabling scalable experiments with cloud GPUs and governance.

Core Features & Use Cases

  • Supports TRL training methods (SFT, DPO, GRPO) with cloud-based provisioning and hub persistence.
  • Integrates with Trackio for real-time monitoring and with Hugging Face Hub for pushing trained adapters and models.
  • Includes dataset validation tooling and end-to-end pipelines to produce production-ready artifacts (GGUF conversion guidance included).

Quick Start

Submit a TRL training job to Hugging Face Jobs using an inline script or the provided TRL templates.

Frequently Asked Questions about hugging-face-model-trainer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fine-tune a LLM with TRL on Hugging Face Jobs?

To fine-tune an LLM with TRL on Hugging Face Jobs, submit an inline TRL training script or use provided templates to provision cloud GPUs for SFT, DPO, or GRPO workflows. The process integrates Hub persistence and Trackio monitoring.

What is the difference between SFT, DPO, and GRPO in TRL training workflows?

SFT, DPO, and GRPO in TRL training workflows represent supervised fine-tuning, direct preference optimization, and group relative policy optimization respectively. They enable scalable language model alignment and training experiments on cloud GPUs.

Do I need specific Python packages to run TRL training jobs on Hugging Face?

Yes, you need a Python environment with TRL, PEFT, Transformers, Accelerate, and Torch installed. Properly configured Hugging Face Hub secrets are also required for pushing trained adapters, models, and tracking with Trackio.

Can I convert my trained Hugging Face model to GGUF format?

Yes, you can convert your trained Hugging Face model to GGUF format. The training pipeline includes end-to-end guidance for GGUF conversion to help you produce production-ready artifacts from your fine-tuned TRL models.

How do I monitor TRL training metrics in real-time?

You monitor TRL training metrics in real-time using Trackio integration. Trackio works alongside Tensorboard within the Hugging Face Jobs environment to provide live tracking and governance for your scalable experiments.

Why do my Hugging Face Hub pushes fail during TRL model training?

Hugging Face Hub pushes fail during TRL model training when repository secrets are not properly configured. You must validate your dataset tooling and ensure your Hugging Face Hub access tokens have write permissions for pushing trained adapters and models.