Saltar al contenido principal

I Trained My Own Tiny GPT From Scratch — And Ran It Locally

03 Jul 2026
8:17
39 reproducciones

Most people think training an LLM means thousands of GPUs, massive datasets, and millions of dollars. That is true if you want to train something like ChatGPT. But in this video, I show how I trained a small decoder-only GPT-style language model from scratch using the TinyStories dataset — and ran it locally. This is not a chatbot. This is not instruction tuning. This is the basic idea behind language models: given a sequence of tokens, predict the next token. In this video, we go through the complete pipeline: * Preparing the TinyStories dataset * Creating a decoder-only GPT-style model * Training the model locally * Testing and evaluating the model * Generating text from the trained model * Serving the model using FastAPI The goal is not to beat ChatGPT. The goal is to understand how LLM training works end to end and prove that small, task-specific language models can still be useful. If you are learning AI engineering, I highly recommend going through this process at least once. After this, LLMs will stop feeling like magic and start feeling like systems you can understand, modify, and build. Get the code: https://www.rajkapadia.com/resources/432e3750-0eee-4da5-80b0-0cadf84f918b 00:00 The Myth About Training LLMs 00:53 TinyStories Dataset & Next Token Prediction 01:30 Why Small LLMs Still Matter 02:20 Project Structure & Important Files 04:03 Setup Commands & Training Pipeline 05:49 Generating Text From the Trained Model 06:24 Serving the Model With FastAPI 🚀 Join My Free Community! 👇 🌐 Nas.io - [Learn Everything About Chatbots](https://nas.io/learn-everything-about-chatbots) 📚 Master Google Dialogflow & Build Smart Chatbots! ES: [Enroll Now](https://www.udemy.com/course/master-google-dialogflow-build-smart-chatbots/) CX: [Enroll Now](https://www.udemy.com/course/master-dialogflow-cx-build-engaging-chatbots-2025) 💬 Join Our Discord Group & Connect with Like-Minded People! 🔗 [Discord Community](https://discord.gg/dKruft7Kqs) 🔥 Get Exclusive Perks & Behind-the-Scenes Content! 🎥 [Join This Channel](https://www.youtube.com/channel/UCOT01XvBSj12xQsANtTeAcQ/join) 💡 Need a Custom Chatbot or AI/ML/DL Solution? 📩 Contact me for: 🤖 Chatbot Development | 🧠 AI/ML/DL Projects 🎯 Hire Me on Freelance Platforms! 💼 [Fiverr Profile](https://www.fiverr.com/rajkkapadia) 💼 [Upwork Profile](https://www.upwork.com/freelancers/~0176aeacfcff7f1fc2) 💼 [LinkedIn Profile](https://www.linkedin.com/in/rajkkapadia/) 📢 Share Your Thoughts! 💬 Drop a comment below & let me know what you think about this video! 📌 Don't Forget to: 👍 LIKE | 🔔 SUBSCRIBE | 💬 COMMENT 🎶 Enjoy Life, Feel the Music. ✌️ Peace.

Comentarios
Debes iniciar sesión para comentar.

No hay comentarios aún. ¡Sé el primero en comentar!