microgpt
gist.github.com · 1,270 words · saved by 1 readers
microgpt. GitHub Gist: instantly share code, notes, and snippets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters """ The most atomic way to train and run inference for a GPT in pure, dependency-free Python. This file is the complete algorithm. Everything else is just efficiency. @karpathy """ import os # os.path.exists import math # math.log, math.exp import random # random.seed, random.choices, random.gauss,…
saved by
related reading
- microgptkarpathy.github.io
- Let's build GPT: from scratch, in code, spelled out.youtube.com
- GPT in 60 Lines of NumPy | Jay Modyjaykmody.com
- The Annotated Transformernlp.seas.harvard.edu
- Let's reproduce GPT-2 (124M)youtube.com
- The Annotated Transformernlp.seas.harvard.edu
- GitHub - karpathy/autoresearch: AI agents running research on single-GPU nanochat training automaticallygithub.com
- gpt-4.pdfcdn.openai.com
- interpreting GPT: the logit lens — LessWronglesswrong.com
- GitHub - karpathy/nanochat: The best ChatGPT that $100 can buy.github.com
- Neural Networks: Zero To Herokarpathy.ai
- GitHub - rasbt/LLMs-from-scratch: Implement a ChatGPT-like LLM in PyTorch from scratch, step by stepgithub.com