-
Why Your Training Loss Exploded to NaN: The Math of Learning Rate, Not Guesswork
A loss curve that spikes to NaN mid-training isn’t random instability — it’s a provable consequence of crossing an exact convergence threshold. Here’s the derivation, and what it means for…
-
The Math Behind Every LLM, in Five Steps: Vectors to Cross-Entropy Loss
One continuous derivation connects vectors, matrices, gradients, and probability into the exact training objective behind every modern language model. Here’s the full arc, with the reasoning that forces each step.
-
Softmax and Cross-Entropy Explained: The Loss Function Behind Every LLM (Ep:02.04)
Softmax turns raw scores into a probability distribution; cross-entropy measures how wrong that distribution is. Module 2 of From Zero to Agents derives both from probability theory, proves the famous…
-

Why Learning Rate Matters: Gradient Descent Convergence, Proven With a Closed-Form Equation (Ep:02.03)
A learning rate that’s too large doesn’t just train slower — it can make loss diverge to infinity, provably. Module 2 of From Zero to Agents derives the exact convergence…
-
Derivatives and Gradients — The Mechanism Behind “Learning” (Ep:02.02)
Every neural network “learns” by following a gradient downhill. Module 2 of From Zero to Agents builds derivatives, partial derivatives, and the chain rule from first principles, verifies them against…
-
Matrices — Organized, Simultaneous Dot Products (Ep:02.01)
A matrix is just organized, simultaneous dot products. Module 2 of From Zero to Agents builds matrix multiplication from first principles and uses it to fully decode the real attention…
-
Vectors, Norms, and Dot Products Explained: The Math Behind Every Embedding (Ep.02.00)
Every embedding, similarity score, and attention weight in modern AI comes down to vector operations. Module 2 of From Zero to Agents builds vectors, norms, and dot products from first…
-

Why Your Chatbot Breaks on Typos and What Actually Fixes It
A single misspelled word can silently degrade an LLM application’s output. Here’s what’s actually happening under the hood, and why byte-level BPE tokenization — not better prompting — is the…

