hugging-face-model-trainer
This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs package, UV scripts with PEP 723 format, dataset preparation and validation, hardware selection, cost estimation, Trackio monitoring, Hub authentication, and model persistence. Should be invoked for tasks involving cloud GPU training, GGUF conversion, or when users mention training on Hugging Face Jobs without local GPU setup.
How to use
Zainstaluj umiejętność w swoim agencie lub Claude'a poprzez dodanie referencji do hugging-face-model-trainer z repozytorium ai-engineering-hub.
Przygotuj swój zbiór danych w formacie obsługiwanym przez TRL (np. instrukcje dla SFT, preferencje dla DPO). Zweryfikuj strukturę danych i upewnij się, że zawierają one wymagane pola (tekst, instrukcja, odpowiedź lub preferencje).
Wybierz metodę treningu odpowiednią do Twoich potrzeb: SFT do standardowego dostrajania instrukcji, DPO do wyrównania modelu na podstawie danych preferencji, GRPO do treningu online RL, lub Reward Modeling do trenowania modeli nagród dla RLHF.
Skonfiguruj skrypt treningowy używając pakietu TRL Jobs z formatem UV i PEP 723. Określ model bazowy, parametry treningu, typ sprzętu GPU i szacunkowy budżet kosztów.
Uwierzytelnij się na Hugging Face Hub i skonfiguruj monitorowanie za pomocą Trackio, aby śledzić postęp treningu w czasie rzeczywistym.
Po zakończeniu treningu model zostanie automatycznie zapisany na Hugging Face Hub. Jeśli chcesz używać modelu lokalnie, przekonwertuj go do formatu GGUF dla Ollamy, LM Studio lub llama.c.