I Trained a Tiny AI on Wikipedia (Python + PyTorch Tutorial)
Description: I built a mini ChatGPT from scratch in Python and PyTorch, fed it 20 million letters of Wikipedia, then gave it a search page where you can ask it anything. It's a 4.8M-parameter GPT that reads one letter at a time, and you can watch it go from random letters to real English while it trains. It still slips sometimes (pizza is apparently popular on the Moon 😄).
Requested by @tanzinazaman-w1r, thank you! 🙌
⏱️ Chapters
0:00 The result
0:15 Download Wikipedia (data.py)
1:29 The GPT model (model.py)
8:18 The training loop (train.py)
11:33 Watch it learn
11:54 The AI server (server.py)
14:11 The search page (HTML + CSS)
20:10 Asking the AI (JavaScript)
🛠️ Built with: Python, PyTorch, Hugging Face datasets, HTML, CSS, JavaScript
💬 What should the tiny AI learn next? Tell me in the comments.
👍 Like and subscribe for more full builds.
📩 Business / commissions: qaiszayed.work00@gmail.com
#pov #minichatgpt #pythontutorial #pytorchtutorial #trainai Close description
Requested by @tanzinazaman-w1r, thank you! 🙌
⏱️ Chapters
0:00 The result
0:15 Download Wikipedia (data.py)
1:29 The GPT model (model.py)
8:18 The training loop (train.py)
11:33 Watch it learn
11:54 The AI server (server.py)
14:11 The search page (HTML + CSS)
20:10 Asking the AI (JavaScript)
🛠️ Built with: Python, PyTorch, Hugging Face datasets, HTML, CSS, JavaScript
💬 What should the tiny AI learn next? Tell me in the comments.
👍 Like and subscribe for more full builds.
📩 Business / commissions: qaiszayed.work00@gmail.com
#pov #minichatgpt #pythontutorial #pytorchtutorial #trainai Close description
