llm-fine-tuning
Set up infrastructure for fine-tuning LLMs with QLoRA, LoRA, and full fine-tuning using Hugging Face TRL, Axolotl, and distributed training with DeepSpeed or FSDP. Covers dataset prep, training runs, and model export.
npx skills add majiayu000/claude-skill-registry --skill llm-fine-tuning-bagelhole-devops-security-agen --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# LLM Fine-Tuning Infrastructure Train and fine-tune open-source LLMs efficiently — from LoRA on a single GPU to distributed full fine-tuning across multi-node clusters. ## When to Use This Skill Use this skill when: - Fine-tuning an LLM on domain-specific data (legal, medical, code, support) - Running QLoRA to fine-tune 70B models on consumer GPUs - Setting up distributed training with DeepSpeed or FSDP - Exporting fine-tuned adapters for production serving - Implementing RLHF, DPO, or instruction tuning pipelines ## Prerequisites - NVIDIA GPU(s) with 24GB+ VRAM (RTX 4090 / A100 / H100) - CUDA 12.1+ and `nvidia-smi` working - Python 3.10+ with `pip` - Hugging Face account and `HF_TOKEN` for gated models - 500GB+ disk for model weights and training data ## Quick Start: QLoRA Fine-Tuning ```bash pip install transformers datasets trl peft bitsandbytes accelerate python - <<'EOF' from datasets import load_dataset from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig from peft import LoraConfig, get_peft_model from trl import SFTTrainer, SFTConfig import torch model_id = "meta-llama/Llama-3.1-8B-Instruct" # 4-bit quantization (QLoRA) bnb_config = BitsAndBytes
- When to Use This Skill
- Prerequisites
- Quick Start: QLoRA Fine-Tuning
- Axolotl (Production Fine-Tuning Framework)
- Distributed Training with DeepSpeed
- DPO / RLHF Alignment
- Merging LoRA Adapters for Deployment
- Kubernetes Training Job
- Common Issues
- Best Practices
- Related Skills
pip install transformers datasets trl peft bitsandbytes accelerate python - <<'EOF' Run with Axolotl pip install axolotl[flash-attn,deepspeed] accelerate launch -m axolotl.cli.train config.yaml Launch 4-GPU DeepSpeed training deepspeed --num_gpus=4 train.py \
What does the llm-fine-tuning skill do?
Set up infrastructure for fine-tuning LLMs with QLoRA, LoRA, and full fine-tuning using Hugging Face TRL, Axolotl, and distributed training with DeepSpeed or FSDP. Covers dataset prep, training runs, and model export.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill llm-fine-tuning-bagelhole-devops-security-agen --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
