mkurman/zorai/nanogpt

Claude Code and agent skill by mkurman/zorai

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install mkurman/zorai/nanogpt

SKILL.md

The same SKILL.md was published earlier as mkurman/zorai/nanogpt.


name: nanogpt description: "Minimal GPT pretraining and fine-tuning (nanoGPT). The simplest, fastest repository for training medium-sized GPTs with ~300-line model.py and ~300-line train.py. Reproduces GPT-2 (124M) on OpenWebText. Supports DDP multi-GPU/multi-node, character-level training, weight loading from HuggingFace GPT-2 checkpoints, and simple finetuning. Note: superseded by nanochat for new projects; this repo remains valuable as a reference implementation and learning tool." license: MIT license tags: [gpt-pretraining, autoregressive-language-modeling, ddp-training, checkpoint-finetuning, nanogpt] metadata: skill-author: K-Dense Inc. -----|--------|--------|-------|---------|-------------|

Shakespeare char~10M663841 GPU, 3 min
GPT-2 small124M12127688×A100, 4 days
GPT-2 medium350M24161024Modify config
GPT-2 large774M36201280Modify config
GPT-2 XL1.5B48251600Multi-node
10. Evaluation and Benchmarks
bash
# Benchmark training speed
python train.py config/train_gpt2.py --eval_only
# Loss tracking
# nanoGPT-reported GPT-2 (124M) on OpenWebText: val loss 2.85
# OpenAI GPT-2 (124M) on WebText: val loss ~3.11
# (domain gap between WebText and OpenWebText accounts for difference)
# Custom benchmarks
python train.py config/train_shakespeare_char.py --eval_iters=200

Key Patterns

  1. Configs are Python files, not YAML — maximum flexibility, easy to diff
  2. `init_from='scratch'|'resume'|'gpt2*'` — switch between training modes
  3. Always use `--compile=True` on GPU for ~2x speedup
  4. Gradient accumulation with `gradient_accumulation_steps` emulates larger batch sizes
  5. Data is raw uint16 .bin files — tokenized once, loaded via memmap
  6. Meta device init for large models — doesn't allocate until needed
  7. Weight tying between wte (embedding) and lm_head — standard GPT practice
  8. Use `torchrun` for multi-GPU — not python -m torch.distributed.launch

References

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
324
Repository forks
26
7-day trend score
29

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 11 Sep 2026, 2 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mkurman/zorai/nanogpt/badge)](https://verified-skill.com/skills/mkurman/zorai/nanogpt)

Something wrong with this skill or its page? Tell us.