Inside GPT – The Maths Behind the Magic
summary
Walkthrough of architecture and hands‑on results explains tokenization, sampling and RAG with concrete numbers: GPT2 locally (≈128M parameters) runs demos that generate song lyrics and stutter in noisy demos; tokenization gives English ~45 tokens, Swedish ~83, Telugu ~622; embeddings use 768‑dim vectors and cosine vs Euclidean similarity is compared; sequence prediction is one token at a time, costing example ~30 SEK per full‑context call; a packing thought experiment claims 95 bottles in a 30L backpack (90.7% hex packing) to show when models hallucinate precise calculations.
AI-written summary · about
chapters (18)
- 0:00Intro
- 6:00Model API architecture
- 7:37GPT sequence prediction
- 8:49Variable length
- 11:13Sequence order
- 11:28Long-term dependencies
- 12:06Prompt engineering
- 13:11Retrieval Augmented Generation (RAG)
- 15:14Demo: ChatGPT2
- 20:25Processing text
- 24:22English is the new programming language
- 29:14Heteronyms
- 34:14Demo: Language tokenization
- 34:46Word/token vectorization/embedding
- 35:52Euclidean vs Cosine similarity
- 37:32Transformer architecture
- 40:23Attention example
- 41:03Outro
related talks
47mInside GPT – Large Language Models Demystified
01h 00mInside GPT – Large Language Models Demystified
01h 01mInside GPT – Large Language Models Demystified
01h 42mHow LLMs work for Web Devs: GPT in 600 lines of Vanilla JS
43mGPT-x, is it really worth it?
38mFrom Von Neumann to Transformers: An Infra Engineer's Guide to What's Actually Inside an LLM.
28mGPT or how I learned to stop worrying and love the generative AI
45mHow to use GPT in your projects: A Case Study
