The Harness, As Feynman Might Have Taught It
An imagined Feynman lecture on the dumbest, most important program in AI: the loop around the model. Play the harness by hand, take one apart, then build a real one on a single page of Python.
Thoughts, ideas, and explorations on AI & ML.
An imagined Feynman lecture on the dumbest, most important program in AI: the loop around the model. Play the harness by hand, take one apart, then build a real one on a single page of Python.
An imagined Feynman lecture on the dumbest, most important program in AI: the loop around the model. Play the harness by hand, take one apart, then build a real one on a single page of Python.
Fifteen parts, one machine. Follow one customer question from Enter to cited answer, then watch where the eight billion weights came from.
An agent is an LLM in a loop: call a tool, read the result, decide, repeat. Watch one fix a bug, then see why long runs break, overspend and need guardrails.
Every AI app kept rewriting the same integrations. MCP turns M × N of them into M + N. Count the savings, watch a session on the wire, catch a poisoned tool.
A model can only write text. Watch it ask for the weather in JSON, see who really runs the tool, and find out where the security has to live.
A model has never read your refund policy. RAG looks it up and pastes it into the prompt. Follow one question through search, chunks, citations and failure.
Give every text coordinates so similar meanings sit close together, and search becomes geometry. Measure fruit, search by meaning, watch an index hop.
Round almost all of a model's billions of weights to one of 16 levels and it still works. Round some yourself, then find out what fits on your machine.
LoRA fine-tunes a giant model by training two skinny matrices per weight matrix. Count the 0.39%, watch an adapter train, and fit a run on one GPU.
A model can learn without ever seeing the right answer, only a score. Train one, rate answers yourself, then watch a loose leash find the loophole.
A base model knows Paris but answers with another quiz question. Fine-tuning fixes it with the same loop on new data. Mask the loss, then watch a model forget.
Training nudges billions of weights at once. Roll a weight down a loss curve, trace blame backwards through a network, and race SGD against Adam.
Every LLM starts as random numbers, then guesses the next token trillions of times. Bet on the next token, train a tiny model live, and see why scale pays.
Watch “bank” pick a meaning, then build attention by hand: queries, keys, values, softmax, and why long contexts cost n² compute and gigabytes.
An LLM is billions of learned numbers. Fit a house price with one, build a neuron, make it bend, count to 8 billion, and see why answers trickle out.
Models never see letters, only numbered chunks of text. Train a real tokenizer in your browser and see why counting the r's in strawberry is so hard.
An LLM guesses the next token, appends it, and guesses again. Roll its dice, then see why it remembers nothing and why long chats cost so much.
A walk through the major families of AI models — what they do, how they work, and what it takes to train them — for people who want intuition, not a textbook.
Learn how to use the waitForTaskToken callback pattern in AWS Step Functions to pause workflows without compute charges, achieving 98% cost savings on long-running async operations.
Learn best practices and techniques for writing effective prompts for small language models like Gemma and LLaMA, including evaluation methods and debugging strategies.
Large Language Models don't have opinions — they predict tokens. Discover why you can always steer them toward any answer you want, and what's really happening under the hood.
Discover how training data shapes language models and why domain-specific knowledge compressed into model weights can dramatically improve reasoning in your field.
Discover how few-shot prompting works in AI by giving models just a handful of examples - and why this mirrors exactly how humans learn through pattern recognition and context.