huggingface-llm-trainer
Train language models on managed Hugging Face infrastructure using TRL's supervised fine-tuning, preference optimization, and reinforcement learning methods. The skill handles cloud GPU job submission, dataset validation, hardware selection, and automatic model persistence to the Hub, with optional GGUF conversion for local deployment via Ollama or llama.cpp.
huggingface-llm-trainer lets you fine-tune language models on cloud GPUs using TRL methods like SFT and DPO without local infrastructure.
AI-generated summary based on this skill's SKILL.md
Install
huggingface/skills/huggingface-llm-trainer · repository language: Python
git clone https://github.com/huggingface/skills
cp -r skills/skills/huggingface-llm-trainer ~/.claude/skills/huggingface-llm-trainernpx skillfed install huggingface/skills/huggingface-llm-trainerFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I fine-tune a language model on Hugging Face cloud?
huggingface-llm-trainer enables fine-tuning on Hugging Face's managed infrastructure using TRL methods. You define your dataset, select cloud GPU hardware, and submit a training job through Hugging Face Jobs. The skill handles supervised fine-tuning (SFT), preference optimization (DPO, GRPO), and reinforcement learning workflows, then automatically saves your trained model to the Hub.
Can I train LLM with TRL without a local GPU?
Yes. huggingface-llm-trainer is designed for cloud-based training on Hugging Face infrastructure, eliminating the need for local GPU hardware. You submit TRL training jobs to Hugging Face's managed GPUs, monitor progress with Trackio, and retrieve results without maintaining expensive local compute resources.
What is SFT DPO GRPO training on Hugging Face Jobs?
huggingface-llm-trainer supports three core TRL training methods: SFT (supervised fine-tuning) for instruction alignment, DPO (direct preference optimization) for preference learning without reward models, and GRPO (group relative policy optimization) for reinforcement learning. Each runs as a cloud job on Hugging Face infrastructure with automatic result persistence to the Hub.
How do I convert my trained model to GGUF for Ollama?
huggingface-llm-trainer includes GGUF conversion functionality to prepare trained models for local deployment. After training completes and your model is saved to the Hub, you can convert it to GGUF format for use with Ollama or llama.cpp, enabling efficient local inference without cloud dependencies.
How can I validate datasets and estimate training costs?
huggingface-llm-trainer provides dataset validation and cost estimation tools before submitting GPU jobs. These features help you verify data quality, check format compatibility, and preview hardware pricing so you can optimize your training budget and avoid expensive failed runs.
Can huggingface-llm-trainer train vision models with reduced VRAM?
Yes. huggingface-llm-trainer integrates Unsloth for efficient vision model training, significantly reducing VRAM requirements. This allows you to train vision language models (VLMs) on smaller or more cost-effective cloud GPUs while maintaining training speed and model quality.
SKILL.md
rendered from the published skill — quoted content, verbatim
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
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 15 files
skills/huggingface-llm-trainer/SKILL.md
skills/huggingface-llm-trainer/references/gguf_conversion.md
skills/huggingface-llm-trainer/references/hardware_guide.md
skills/huggingface-llm-trainer/references/hub_saving.md
skills/huggingface-llm-trainer/references/local_training_macos.md
skills/huggingface-llm-trainer/references/reliability_principles.md
skills/huggingface-llm-trainer/references/trackio_guide.md
skills/huggingface-llm-trainer/references/training_methods.md
skills/huggingface-llm-trainer/references/training_patterns.md
skills/huggingface-llm-trainer/references/troubleshooting.md
skills/huggingface-llm-trainer/references/unsloth.md
skills/huggingface-llm-trainer/scripts/convert_to_gguf.py
skills/huggingface-llm-trainer/scripts/dataset_inspector.py
skills/huggingface-llm-trainer/scripts/estimate_cost.py
skills/huggingface-llm-trainer/scripts/hf_benchmarks.py