param087/agent-ml-skills/llm-finetuning
Claude Code and agent skill by param087/agent-ml-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when fine-tuning a large language model. Covers choosing full vs LoRA/QLoRA, dataset formatting, the transformers/PEFT/TRL stack, key hyperparameters, and evaluating fine-tunes without overfitting.
Install
npx vskill@latest install param087/agent-ml-skills/llm-finetuningSKILL.md
The same SKILL.md was published earlier as param087/agent-ml-skills/llm-finetuning.
LLM Fine-Tuning
Overview
Fine-tuning adapts a base LLM to a task or style. For almost all practitioners the right default is parameter-efficient fine-tuning (LoRA/QLoRA) — it trains <1% of weights, fits on a single GPU, and avoids catastrophic forgetting. Reach for full fine-tuning only with strong justification and budget.
When to use
- A base/instruct model is close but needs domain style, format, or behavior.
- You have a few hundred to tens of thousands of quality examples.
First decide: do you even need to fine-tune?
Try prompting + few-shot + RAG first (see the rag-pipeline skill). Fine-tune when you need consistent format/style, lower latency/cost than long prompts, or to internalize a large example set.
Method selection
| Method | Trains | VRAM | Use when | |
|---|---|---|---|---|
| Full FT | 100% | Very high | Large data + budget, max quality | |
| LoRA | ~0.1-1% | Moderate | Default for most tasks | |
| QLoRA | ~0.1-1% | Low (4-bit) | Single consumer GPU |
Dataset formatting (chat / instruction)
Use the model's chat template; quality > quantity. A few thousand clean, diverse examples beat a noisy 100k dump.
QLoRA with TRL
Key hyperparameters
- LR: 1e-4 to 3e-4 for LoRA (higher than full FT).
- Epochs: 1-3 — more overfits and degrades general ability.
- LoRA rank `r`: 8-32 typical; raise for harder tasks.
- Effective batch: use gradient accumulation to reach 16-32.
Evaluating a fine-tune
- Hold out a real test set; track eval loss for overfitting.
- Judge on task metrics (exact match, rubric/LLM-judge), not just loss.
- Check for regression on general benchmarks — fine-tuning can break unrelated abilities.
Pitfalls
- Too many epochs / LR too high → overfit, repetitive or degenerate outputs.
- Wrong chat template → the model learns malformed formatting.
- Tiny/dirty dataset → memorization, not generalization.
- Skipping a base-model baseline → you can't prove the fine-tune helped.
Hand-off
Merged or adapter weights + eval report, logged via experiment-tracking and deployed via model-serving.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/llm-finetuning/SKILL.md
Popularity
- Repository stars
- 11
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/param087/agent-ml-skills/llm-finetuning)