Implementing LLMs with LitGPT
A skill that walks you through loading, fine-tuning (LoRA/QLoRA), pretraining and deploying 20+ LLM architectures with Lightning AI's LitGPT.
Dev & CodingAdvanced★ 11,726⑂ 856AI score 8/10Last updated: Jun 16, 2026
What it does
- Covers LitGPT installation and loading 20+ pretrained models (Phi-2, Llama 3, Gemma, Qwen, Mistral) via
LLM.load(). - Provides checklist workflows: prepare an Alpaca-style JSON dataset → full or LoRA fine-tune → merge adapters.
- Explains pretraining from scratch on domain corpora with FSDP, multi-GPU and SLURM launches.
- Includes deployment steps — quantization, GGUF conversion, FastAPI serving — plus fixes for OOM and slow training.
- Compares LitGPT with Axolotl/TRL, Megatron-Core and vLLM so you know when to pick it.
Who it's for
- ML engineers fine-tuning small LLMs on a single 12–16GB GPU.
- Researchers and students who want single-file, abstraction-free architecture code to learn from.
- Teams already in the Lightning ecosystem or pretraining domain-specific models.
Examples
- "LoRA fine-tune Phi-2 on 3,000 support tickets" → dataset formatting,
litgpt finetune_loraflags, memory estimates. - "I hit OOM full fine-tuning a 7B model" → switch to LoRA, tune micro/global batch size, enable gradient accumulation.
- "Serve my trained adapter behind an API" →
merge_lora, quantize, then a FastAPI endpoint snippet.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/Orchestra-Research/AI-Research-SKILLs/HEAD/01-model-architecture/litgpt/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the 01-model-architecture/litgpt folder from the GitHub repo Orchestra-Research/AI-Research-SKILLs into my ~/.claude/skills/implementing-llms-litgpt/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/Orchestra-Research/AI-Research-SKILLs.git && mkdir -p ~/.claude/skills && cp -r AI-Research-SKILLs/01-model-architecture/litgpt ~/.claude/skills/implementing-llms-litgpt⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and make sure Claude Code is installed.
- Clone the skill repository:
git clone https://github.com/Orchestra-Research/AI-Research-SKILLs.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r AI-Research-SKILLs/01-model-architecture/litgpt ~/.claude/skills/implementing-llms-litgpt - To actually run training, install the library:
pip install 'litgpt[extra]'(an NVIDIA/CUDA GPU is recommended). - Restart Claude Code and try a prompt like "Help me LoRA fine-tune Phi-2 with LitGPT."
View source on GitHub ↗License: MIT