hugging-face-model-trainer

Train language models with TRL on Hugging Face Jobs.

36.9k|6.1k|Updated Oct 21, 2024
One-click install
npx skills add https://github.com/patchy631/ai-engineering-hub --skill hugging-face-model-trainer-patchy631
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hugging-face-model-trainer
Source: https://github.com/patchy631/ai-engineering-hub/tree/main/hugging-face-skills/skills/hugging-face-model-trainer
Command: npx skills add https://github.com/patchy631/ai-engineering-hub --skill hugging-face-model-trainer-patchy631

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires trl>=0.12.0, peft>=0.7.0, transformers>=4.36.0, accelerate>=0.24.0, trackio, torch>=2.0.0, huggingface_hub>=0.20.0, sentencepiece>=0.1.99, protobuf>=3.20.0, numpy, gguf, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables teams to orchestrate TRL-based training workflows on Hugging Face Jobs, simplifying cloud-based fine-tuning of language models and automated deployment to the Hub.

Core Features & Use Cases

  • End-to-end TRL training: SFT, DPO, GRPO, and Reward Modeling workflows on HF Jobs with real-time monitoring via Trackio.
  • GGUF conversion readiness: templates and guidance to convert LoRA-finetuned models to GGUF for local inference.
  • Operational guidance: dataset validation, hardware selection, cost estimation, hub authentication, and model persistence.

Quick Start

Submit a minimal TRL training job using an inline script via hf_jobs, leveraging the provided templates in scripts/ and referencing the references docs for setup.

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 language model using TRL on Hugging Face Jobs?

To fine-tune a language model with TRL on Hugging Face Jobs, submit an inline script using the provided production-ready templates. The workflow supports SFT, DPO, and GRPO while managing cloud GPU orchestration and Hub authentication automatically.

Does Hugging Face Jobs support GGUF conversion for locally trained models?

Yes, Hugging Face Jobs supports GGUF conversion readiness. This skill provides specific templates and guidance to convert your LoRA-finetuned models into the GGUF format, enabling efficient local inference after cloud training.

Can I monitor SFT and DPO training metrics in real-time on cloud GPUs?

You can monitor SFT and DPO training metrics in real-time on cloud GPUs using Trackio. The skill integrates Trackio directly into the TRL training workflow to track progress and estimate operational costs.

Do I need to manually install TRL and Transformers dependencies to run HF Jobs?

You do not need to manually install TRL, Transformers, or PEFT dependencies. The skill enforces inline dependency declarations via PEP 723 headers, ensuring the cloud environment automatically resolves required packages.

What is the best way to validate datasets before starting a GRPO workflow?

The best way to validate datasets before a GRPO workflow is using the operational guidance included in the skill. It provides specific reference templates for dataset validation, hardware selection, and cost estimation prior to job submission.