hugging-face-model-trainer
Fine-tune language models on managed Hugging Face infrastructure without local GPU setup using TRL's supervised fine-tuning, preference optimization, and reinforcement learning methods. The skill handles dataset preparation, hardware selection, real-time monitoring via Trackio, and automatic model persistence to the Hub, with built-in support for GGUF conversion to deploy trained models locally.
Hugging Face Model Trainer lets you fine-tune language models on cloud GPUs using TRL methods with automatic Hub persistence.
AI-generated summary based on this skill's SKILL.md
Install
synthetic-sciences/openscience/hugging-face-model-trainer · repository language: TypeScript
git clone https://github.com/synthetic-sciences/openscience
cp -r openscience/backend/cli/skills/ml-training/hugging-face-model-trainer ~/.claude/skills/hugging-face-model-trainernpx skillfed install synthetic-sciences/openscience/hugging-face-model-trainerFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I fine-tune language models on Hugging Face?
hugging-face-model-trainer enables fine-tuning on managed Hugging Face cloud infrastructure using TRL methods without requiring local GPU setup. You prepare your dataset in the required format, select your target model and hardware (such as A10G GPUs), and launch a training job. The skill handles supervised fine-tuning (SFT), preference optimization (DPO), GRPO, and reward model training workflows, automatically persisting checkpoints and pushing your trained model to the Hub.
Can I train a model with TRL on cloud GPU without local hardware?
Yes—hugging-face-model-trainer is designed specifically for cloud-based training on Hugging Face infrastructure. You specify your training method (SFT, DPO, GRPO, or reward modeling), dataset, and hardware tier, then the skill orchestrates the entire job on managed GPUs. Real-time monitoring via Trackio tracks progress, and you avoid the complexity and cost of maintaining local GPU infrastructure.
How do I convert my trained model to GGUF for Ollama?
hugging-face-model-trainer supports automatic conversion of trained models to GGUF format for local deployment with Ollama or llama.cpp. After training completes and your model is saved to the Hub, the skill can transform it into the GGUF quantized format, enabling you to run your fine-tuned model efficiently on consumer hardware without cloud dependencies.
What dataset format does hugging-face-model-trainer require?
hugging-face-model-trainer validates datasets before GPU training to catch format issues early. It supports standard formats for SFT (instruction-response pairs), DPO (preference pairs with chosen/rejected outputs), GRPO, and reward model training. The skill checks schema compliance, handles data preprocessing, and ensures your dataset is ready before consuming expensive cloud compute resources.
How can I estimate training time and cost on Hugging Face?
hugging-face-model-trainer provides cost and duration estimation based on your model size, dataset volume, hardware selection, and training method. You input parameters like batch size, learning rate, and GPU tier (e.g., A10G), and the skill calculates projected hours and cloud charges, helping you optimize resource allocation before launching expensive training jobs.
How do I monitor training progress and troubleshoot failures?
hugging-face-model-trainer integrates Trackio for real-time training monitoring, displaying loss curves, learning rates, and resource utilization. When training encounters common failures—out-of-memory errors, gradient issues, or checkpoint corruption—the skill provides diagnostic guidance and recovery steps, reducing downtime and helping you iterate quickly on hyperparameter tuning.
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
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 15 files
backend/cli/skills/ml-training/hugging-face-model-trainer/SKILL.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/gguf_conversion.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/hardware_guide.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/hub_saving.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/reliability_principles.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/trackio_guide.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/training_methods.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/training_patterns.md
backend/cli/skills/ml-training/hugging-face-model-trainer/references/troubleshooting.md
backend/cli/skills/ml-training/hugging-face-model-trainer/scripts/convert_to_gguf.py
backend/cli/skills/ml-training/hugging-face-model-trainer/scripts/dataset_inspector.py
backend/cli/skills/ml-training/hugging-face-model-trainer/scripts/estimate_cost.py
backend/cli/skills/ml-training/hugging-face-model-trainer/scripts/train_dpo_example.py
backend/cli/skills/ml-training/hugging-face-model-trainer/scripts/train_grpo_example.py
backend/cli/skills/ml-training/hugging-face-model-trainer/scripts/train_sft_example.py