Tooluck logoTooluck
SKILL.md

implementing-llms-litgpt

Agent skill fromOrchestra-Research/AI-Research-SKILLs

Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral). Use when need clean model implementations, educational understanding of architectures, or production fine-tuning with LoRA/QLoRA. Single-file implementations, no abstraction layers.

How to install implementing-llms-litgpt

install implementing-llms-litgpt
# install the AI-Research-SKILLs pack with the skills CLI
npx skills add Orchestra-Research/AI-Research-SKILLs

# or add only this skill to Claude Code: copy the folder

01-model-architecture/litgpt/

# into

~/.claude/skills/litgpt/ (all projects)

.claude/skills/litgpt/ (one project)

01-model-architecture/litgpt/SKILL.md

MITFull file
1# LitGPT - Clean LLM Implementations
2
3## Quick start
4
5LitGPT provides 20+ pretrained LLM implementations with clean, readable code and production-ready training workflows.
6
7**Installation**:
8```bash
9pip install 'litgpt[extra]'
10```
11
12**Load and use any model**:
13```python
14from litgpt import LLM
15
16# Load pretrained model
17llm = LLM.load("microsoft/phi-2")
18
19# Generate text
20result = llm.generate(
21 "What is the capital of France?",
22 max_new_tokens=50,
23 temperature=0.7
24)
25print(result)
26```
27
28**List available models**:
29```bash
30litgpt download list
31```
32
33## Common workflows
34
35### Workflow 1: Fine-tune on custom dataset
36
37Copy this checklist:
38
39```
40Fine-Tuning Setup:
41- [ ] Step 1: Download pretrained model
42- [ ] Step 2: Prepare dataset
43- [ ] Step 3: Configure training
44- [ ] Step 4: Run fine-tuning
45```
46
47**Step 1: Download pretrained model**
48
49```bash
50# Download Llama 3 8B
51litgpt download meta-llama/Meta-Llama-3-8B
52
53# Download Phi-2 (smaller, faster)
54litgpt download microsoft/phi-2
55
56# Download Gemma 2B
57litgpt download google/gemma-2b
58```
59
60Models are saved to `checkpoints/` directory.
61
62**Step 2: Prepare dataset**
63
64LitGPT supports multiple formats:
65
66**Alpaca format** (instruction-response):
67```json
68[
69 {
70 "instruction": "What is the capital of France?",
71 "input": "",
72 "output": "The capital of France is Paris."
73 },
74 {
75 "instruction": "Translate to Spanish: Hello, how are you?",
76 "input": "",
77 "output": "Hola, ¿cómo estás?"
78 }
79]
80```
81
82Save as `data/my_dataset.json`.
83…

Excerpt shown under the repository's MIT license.

More skills in AI-Research-SKILLs

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates