About hugging-face-model-trainer
Hugging Face Model Training is a skill for developers planning or running language-model training with TRL or Unsloth. It covers SFT, DPO, GRPO, and GGUF conversion, with guidance on bounded pilots, environment checks, and budget approval.
Key features
- 01Plan SFT, DPO, and GRPO training
- 02Use TRL and Unsloth examples
- 03Run bounded pilots and measure duration
- 04Estimate arithmetic costs with a script
- 05Inspect job state, logs, and checkpoints
- 06Prepare local GGUF conversion
Use cases
- 01Prepare approved models and data for training
- 02Test training settings within an approved budget
- 03Check training jobs and checkpoint recovery
- 04Prepare a model for GGUF conversion
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ sickn33/ agentic-awesome-skills --skill hugging-face-model-trainerAfter installing, type/hugging-face-model-trainerin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/reliability_principles.mdlocal_training_macos.mdhub_saving.mdtrackio_guide.mdhardware_guide.mdtraining_patterns.mdgguf_conversion.mdtraining_methods.mddetailed-guide.mdunsloth.mdtroubleshooting.mdscripts/convert_to_gguf.pytest_model_trainer_review.pyestimate_cost.pytrain_dpo_example.pytrain_sft_example.pytrain_grpo_example.pydataset_inspector.pyhf_benchmarks.pyunsloth_sft_example.pyDetails
From the project READMEHugging Face Model Training
When to Use
Use for planning and running language-model SFT, DPO or GRPO training with TRL or Unsloth, and for preparing GGUF conversion. The bundled Unsloth example is a text-training example; it is not an implementation of vision training or streaming support. Read the detailed guide and only the method-specific references needed for the task.
Before Execution
The user must approve the exact training data and model revisions, destination, hardware, duration and compute budget before a paid job. Training authorization does not automatically authorize public Hub repositories, telemetry, tracking Spaces, or uploading private datasets. Confirm current account eligibility, quotas and prices through the actual provider; do not infer them from old tables.
Use whichever supported Jobs interface is actually available. Inspect its current
schema before submitting. The string $HF_TOKEN is not a universal secret
interpolation protocol. Use the host's documented secret binding without printing
credentials, putting them in source, or changing an unrelated login session.
Read-only operations need no write token. Grant write access only to an approved
artifact destination.
Validate sample values, types, chat roles, model chat templates and the complete
bounded training subset before reserving compute. Column names alone do not prove
compatibility. GRPO additionally needs an explicit, tested reward function. Pin
reviewed dependency versions and immutable model/dataset revisions. Review any
required remote model code separately; default to trust_remote_code=False.
Workflow
- Confirm the method and baseline; inspect the bundled example before adapting it.
- Run a bounded pilot with an explicit maximum number of steps and examples. Verify memory use on the actual sequence length, precision and optimizer. Multiple GPUs require a supported distributed launch; their memory is not automatically a shared pool.
- Use measured pilot duration and a current user-supplied rate with
scripts/estimate_cost.py --measured-hours 0.1 --hourly-rate 2. The numbers in this example are arithmetic inputs, not provider prices. - Choose a deadline within the approved budget. Configure private durable checkpoints or an approved storage destination before an ephemeral job starts. Uploading to the Hub is one option; public publishing is never required.
- Inspect job state and sanitized logs. Check checkpoint recovery and evaluate on held-out data before calling a run successful. Do not resubmit a job with an uncertain outcome until its status is known.
Examples
For SFT, adapt scripts/train_sft_example.py to the approved model and text or
chat dataset. For preference learning inspect scripts/train_dpo_example.py;
for online rewards inspect scripts/train_grpo_example.py. These are examples
requiring environment-specific verification, not certified production jobs.
For local conversion inspect scripts/convert_to_gguf.py before use. Review and
pin llama.cpp and its dependencies. Keep intermediate artifacts until conversion
and any separately approved upload succeed. Respect base-model, adapter and data
licenses; a generated model card cannot grant rights you do not have.
Limitations
Unsloth performance and supported architectures depend on versions, kernels, hardware and workload; percentages are not guarantees. The cost helper performs arithmetic only, not memory sizing, runtime prediction or live quoting. GPU training, model loading, uploads and external tracking have not been executed as part of this source review. References may show older API versions: resolve them against your pinned environment before executing. Do not disable the MPS memory watermark as a generic out-of-memory workaround.