Machine Learning
Perceptrons to transformers to agents: how a network learns from examples, how a language model reads a sentence, and how a model runs a tool.
Neural Networks
The Perceptronin progress
intro · ~25 minOne neuron learns a line: weigh the inputs, fire or not, and on every mistake turn the line toward the point it missed. It always works when a line exists, and never when one does not.
Backpropagationin progress
core · ~35 minOne training step, node by node: run the example forward, measure the error, send the blame back through the weights with the chain rule, and move every weight against it.
Language Models
Embeddingsin progress
core · ~25 minTurn words into arrows so that a dot product measures meaning: words seen together are pulled to point the same way, strangers are pushed apart, and similarity becomes an angle.
Self-Attentionin progress
core · ~30 minEvery token looks at every other: a query scored against each key by a dot product, a softmax that turns the row into weights, and an output that blends the values. Six tokens, one six by six matrix.
The Transformer Blockin progress
advanced · ~35 minOne block, six stops: embed with a position code, attend with every head, add and normalize, feed forward, add and normalize again, predict a word at every position. Untrained weights, real flow.
The KV Cachein progress
core · ~25 minDecoding one token at a time, every step needs every earlier token's key and value, and those never change. Keep them and a step projects one token, not the prefix: a ledger counts the saving.
Agents & Tools
Tool Callingin progress
core · ~20 minA model's tool call is text until the harness makes something of it: parse it, look the tool up, check every argument against the schema, run it, and hand the result back. Every step can say no.
The Agent Loop: Model, Harness, Toolsin progress
core · ~30 minAn agent is a loop: the model proposes, the harness runs the tool and appends what came back, and round it goes until an answer, a turn cap, a token budget, or too many errors. The model is a script.
MCP: The Model Context Protocolin progress
core · ~30 minJSON-RPC with a lifecycle and a vocabulary: initialize negotiates version and capabilities, then the client lists and calls tools, reads resources, and gets prompts, asking only for what was offered.