Agent skill · AI & Agents

nanogpt

Educational GPT implementation in ~300 lines. Reproduces GPT-2 (124M) on OpenWebText. Clean, hackable code for learning transformers. By Andrej Karpathy. Perfect for understanding GPT architecture from scratch. Train on Shakespeare (CPU) or OpenWebText (multi-GPU).

Orchestra-Researchgithub.com/Orchestra-ResearchGitHub ↗
claude-codecodexMIT
Install
npx skills add Orchestra-Research/AI-Research-SKILLs --skill nanogpt --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 4
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.0.0
Declared author: Orchestra Research
Requires: [torch, transformers, datasets, tiktoken, wandb]
Path: 01-model-architecture/nanogpt/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 11,391
Language: TeX
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# nanoGPT - Minimalist GPT Training ## Quick start nanoGPT is a simplified GPT implementation designed for learning and experimentation. **Installation**: ```bash pip install torch numpy transformers datasets tiktoken wandb tqdm ``` **Train on Shakespeare** (CPU-friendly): ```bash # Prepare data python data/shakespeare_char/prepare.py # Train (5 minutes on CPU) python train.py config/train_shakespeare_char.py # Generate text python sample.py --out_dir=out-shakespeare-char ``` **Output**: ``` ROMEO: What say'st thou? Shall I speak, and be a man? JULIET: I am afeard, and yet I'll speak; for thou art One that hath been a man, and yet I know not What thou art. ``` ## Common workflows ### Workflow 1: Character-level Shakespeare **Complete training pipeline**: ```bash # Step 1: Prepare data (creates train.bin, val.bin) python data/shakespeare_char/prepare.py # Step 2: Train small model python train.py config/train_shakespeare_char.py # Step 3: Generate text python sample.py --out_dir=out-shakespeare-char ``` **Config** (`config/train_shakespeare_char.py`): ```python # Model config n_layer = 6 # 6 transformer layers n_head = 6 # 6 attention heads n_embd = 384 # 384-dim embeddings block_si

What's inside
Steps it walks through
  1. Quick start
  2. Common workflows
  3. Workflow 1: Character-level Shakespeare
  4. Workflow 2: Reproduce GPT-2 (124M)
  5. Workflow 3: Fine-tune pretrained GPT-2
  6. Workflow 4: Custom dataset
  7. When to use vs alternatives
  8. Common issues
  9. Advanced topics
  10. Hardware requirements
  11. Resources
Ships with 3 files
  • references/architecture.md
  • references/data.md
  • references/training.md
Commands it runs
pip install torch numpy transformers datasets tiktoken wandb tqdm
Prepare data
python data/shakespeare_char/prepare.py
Train (5 minutes on CPU)
python train.py config/train_shakespeare_char.py
Generate text
python sample.py --out_dir=out-shakespeare-char
Step 1: Prepare data (creates train.bin, val.bin)
Step 2: Train small model
Step 3: Generate text
More from AI-Research-SKILLs
All skills →
About this skill
What does the nanogpt skill do?

Educational GPT implementation in ~300 lines. Reproduces GPT-2 (124M) on OpenWebText. Clean, hackable code for learning transformers. By Andrej Karpathy. Perfect for understanding GPT architecture from scratch. Train on Shakespeare (CPU) or OpenWebText (multi-GPU).

How do I install it?

Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill nanogpt --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 Orchestra-Research/AI-Research-SKILLs, a repository with 11,391 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.

Keep going