<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Training a Tiny GPT on DATATWEETS</title><link>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/</link><description>Recent content in Training a Tiny GPT on DATATWEETS</description><generator>Hugo</generator><language>en</language><copyright>Copyright (c) 2026 Datatweets</copyright><lastBuildDate>Fri, 10 Jul 2026 09:00:00 +0200</lastBuildDate><atom:link href="https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/index.xml" rel="self" type="application/rss+xml"/><item><title>Lesson 1 - Batching &amp; Data Loading</title><link>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-1-batching-and-data-loading/</link><pubDate>Fri, 10 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-1-batching-and-data-loading/</guid><description>Before you can train the mini-GPT you need a way to feed it data. This lesson builds the batching pipeline from scratch in NumPy: sampling random contiguous chunks of the corpus, shifting each chunk by one to make next-token targets, stacking them into a batch, and splitting off a validation set. Every shape and the one-token shift are verified on the real Lantern Bay corpus.</description></item><item><title>Lesson 2 - The Adam Optimizer</title><link>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-2-the-adam-optimizer/</link><pubDate>Fri, 10 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-2-the-adam-optimizer/</guid><description>Plain gradient descent uses one learning rate for every parameter, which stalls when different directions have wildly different curvature. This lesson builds Adam from scratch: first and second moment estimates, bias correction, and the per-parameter step. On an ill-conditioned test problem Adam drives the loss to zero while SGD, held to its largest stable rate, crawls — the reason Adam is the default for transformers.</description></item><item><title>Lesson 3 - The Training Loop</title><link>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-3-the-training-loop/</link><pubDate>Fri, 10 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-3-the-training-loop/</guid><description>This is where the mini-GPT starts to learn. You&amp;rsquo;ll assemble the training loop — get a batch, forward to a loss, backward to gradients, Adam step, repeat — and run it end to end in NumPy on the Lantern Bay corpus. In about 24 seconds on a CPU the loss falls from the random baseline of 3.20 to around 0.13, the headline result of the whole course.</description></item><item><title>Lesson 4 - Monitoring &amp; Overfitting</title><link>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-4-monitoring-and-overfitting/</link><pubDate>Fri, 10 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-4-monitoring-and-overfitting/</guid><description>Training loss alone can&amp;rsquo;t tell whether a model is learning or memorizing. This lesson adds the instrument that can: a held-out validation loss tracked alongside the training loss. On memorizable random data you&amp;rsquo;ll see the textbook overfitting signature — training loss falling while validation loss climbs above the random baseline — and you&amp;rsquo;ll watch a too-high learning rate make a run diverge.</description></item><item><title>Lesson 5 - Guided Project: Train Your Mini-GPT</title><link>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-5-guided-project-train-your-mini-gpt/</link><pubDate>Fri, 10 Jul 2026 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/transformers-from-scratch/training-a-tiny-gpt/lesson-5-guided-project-train-your-mini-gpt/</guid><description>The module comes together into one real training run. You&amp;rsquo;ll configure a 154,456-parameter mini-GPT, train it in about 27 seconds of pure NumPy while tracking train and validation loss down to about 0.12, do a greedy continuation that produces a coherent Lantern Bay sentence, and save the trained weights to disk and reload them — the finished, trained model that Module 8 learns to sample from.</description></item></channel></rss>