# llm-fine-tuning-guide

llm-fine-tuning-guide guides LLM fine-tuning workflows across full training, LoRA, and QLoRA. Helps adapt open weights to specific domains, style requirements, and limited hardware budgets.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 196 installs · ★ 50 repo stars
- Author: qodex-ai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/qodex-ai/ai-agent-skills/tree/HEAD/skills/llm-fine-tuning-guide/SKILL.md
- Updated: 2026-01-05
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/llm-fine-tuning-guide

## What it does

The skill provides architectural guidance and starter code for adapting open-source language models. It walks through full parameter updates with Hugging Face `Trainer` alongside parameter-efficient approaches like LoRA, 4-bit QLoRA, and prefix tuning using the `peft` library.

It outlines explicit constraints on when training makes sense. If your dataset contains fewer than 100 samples or your source data changes frequently, the guide advises leaning on retrieval-augmented generation or prompting instead. Full parameter updates require heavy compute, while QLoRA targets single GPU setups.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill llm-fine-tuning-guide -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/llm-fine-tuning-guide/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/llm-fine-tuning-guide/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill llm-fine-tuning-guide -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/llm-fine-tuning-guide/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill llm-fine-tuning-guide -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/llm-fine-tuning-guide/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install qodex-ai/ai-agent-skills skills/llm-fine-tuning-guide
```

2. **Manually: put the files in place**
- File: `.github/skills/llm-fine-tuning-guide/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill llm-fine-tuning-guide -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/qodex-ai/ai-agent-skills --path skills/llm-fine-tuning-guide
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/llm-fine-tuning-guide/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill llm-fine-tuning-guide -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/qodex-ai/ai-agent-skills/tree/HEAD/skills/llm-fine-tuning-guide/SKILL.md

## When to use it
- configure LoRA and QLoRA hyperparameters using `peft`
- format training data for instruction following workflows
- determine whether a use case requires fine-tuning or RAG
- set up 4-bit quantization with `BitsAndBytesConfig` on a single GPU

## Example prompts
- Show me how to configure QLoRA for Llama-2-7b on a single GPU
- Format this sample dataset into an instruction tuning template
- Evaluate whether my legal document task needs fine-tuning or RAG

## Similar
- [fine-tuning-expert](https://affpapa.org/en/nevibecode/skills/fine-tuning-expert.md) — skill · 4600 installs
- [fine-tuning-peft](https://affpapa.org/en/nevibecode/skills/fine-tuning-peft.md) — skill · 71 installs
- [llm-fine-tuning](https://affpapa.org/en/nevibecode/skills/llm-fine-tuning.md) — skill · 353 installs
- [llm](https://affpapa.org/en/nevibecode/skills/mindrally-llm.md) — skill · 767 installs
- [lora-qlora-recipes](https://affpapa.org/en/nevibecode/skills/lora-qlora-recipes.md) — skill · 2600 installs
- [llm-finetuning](https://affpapa.org/en/nevibecode/plugins/llm-finetuning.md) — plugin · ★ 42780 repo stars

From the same set: [qodex-ai/ai-agent-skills](https://affpapa.org/en/nevibecode/by/qodex-ai/ai-agent-skills.md) — 42 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
