We Got Claude to Fine-Tune an Open Source LLM

Hugging Face has introduced 'Skills', a new toolset that enables AI agents like Claude to manage the entire LLM fine-tuning pipeline, from hardware selection to deployment, using natural language commands.
We gave Claude the ability to fine-tune language models using a new tool called Hugging Face Skills. Not just write training scripts, but to actually submit jobs to cloud GPUs, monitor progress, and push finished models to the Hugging Face Hub. This tutorial shows you how it works and how to use it yourself.
Claude Code can use "skills"—packaged instructions, scripts, and domain knowledge—to accomplish specialized tasks. The hf-llm-trainer skill teaches Claude everything it needs to know about training: which GPU to pick for your model size, how to configure Hub authentication, when to use LoRA versus full fine-tuning, and how to handle the dozens of other decisions that go into a successful training run.
With this skill, you can tell Claude things like:
Fine-tune Qwen3-0.6B on the dataset open-r1/codeforces-cots
And Claude will:
- Validate your dataset format
- Select appropriate hardware (t4-small for a 0.6B model)
- Use and update a training script with Trackio monitoring
- Submit the job to Hugging Face Jobs
- Report the job ID and estimated cost
- Check on progress when you ask
- Help you debug if something goes wrong
The model trains on Hugging Face GPUs while you do other things. When it's done, your fine-tuned model appears on the Hub, ready to use.
This isn't a toy demo. The skill supports the same training methods used in production: supervised fine-tuning, direct preference optimization, and reinforcement learning with verifiable rewards. You can train models from 0.5B to 70B parameters, convert them to GGUF for local deployment, and run multi-stage pipelines that combine different techniques.
Before starting, you'll need:
- A Hugging Face account with a Pro or Team / Enterprise plan
- A write-access token from huggingface.co/settings/tokens
- A coding agent like Claude Code, OpenAI Codex, or Google's Gemini CLI
Hugging Face skills are compatible with Claude Code, Codex, and Gemini CLI. To install a skill, run:
/plugin install hf-llm-trainer@huggingface-skills
You must authenticate to your Hugging Face account with a write-access token so that the job can create a model repo. Set up your token via hf auth login or export HF_TOKEN=hf_your_token.
The skill supports three training approaches:
- SFT (Supervised Fine-Tuning): Best for demonstration data and domain-specific Q&A.
- DPO (Direct Preference Optimization): Aligns model outputs with human preferences using chosen/rejected pairs.
- GRPO: Effective for verifiable tasks like math or coding with programmatic success criteria.
That's the full loop. You describe what you want in plain English, and the agent handles GPU selection, script generation, job submission, authentication, and persistence.
Source: Hugging Face Blog

















