Skip navigation
Nobody ever wrote the code that lets ChatGPT write Python. Not one line of it.
0:00 / 2:57

Nobody ever wrote the code that lets ChatGPT write Python. Not one line of it.

RickTheEngineer

@rick.theengineer59K followers

Visit on TikTok
26,400 likesDownloadOriginal post

423,700 views #llm #artificialintelligence #machinelearning

Nobody ever wrote the code that lets ChatGPT write Python. Not one line of it. 🤯 Here's how a large language model actually gets built, step by step: 1️⃣ Data. Trillions of words of books, web pages, code and forums, then cleaned: duplicates removed, spam filtered, broken text stripped. One open dataset, FineWeb, is 15 trillion tokens of web text. 2️⃣ Tokens. The model never sees words. "Unbelievable" becomes 4 pieces: Un · bel · iev · able. Each piece becomes a number, and each number becomes a vector of hundreds of numbers. 3️⃣ The transformer. Stacks of layers, and inside each one, attention. In "the programmer fixed the server because it crashed", a real GPT-2 attention head sends 54% of "it"'s attention straight to "server". 4️⃣ Pre-training. One task, repeated trillions of times: predict the next token. Guess wrong, measure how wrong, nudge the weights a tiny bit downhill. Meta trained Llama 3 on up to 16,000 GPUs. 5️⃣ Post-training. A pre-trained model is just a very powerful autocomplete. Fine-tuning on good examples, human feedback and checkable rewards (did the math match? did the code pass?) turns it into an assistant. 6️⃣ Serving. A 405-billion-parameter model needs about 810 GB just for its weights. One GPU holds 80. So it gets split, compressed and batched so millions of people can use it at once. Every example in the video comes from a real model: the tokens, the attention, even the loss landscape. The weird part? Writing code, explaining physics, translating French: none of it was programmed. It all emerges from one tiny objective, repeated at enormous scale: predict what comes next, and get slightly less wrong every time. Which step surprised you most? Drop the number 👇 Save this for the next time someone calls AI "just autocomplete." #llm #artificialintelligence #machinelearning #chatgpt #techexplained

Comments

Comments from the original post on TikTok

No comments yet