
What word comes after "It is so hot today, I want something cold like"? Beer, iced tea, ice cream, or math? Computing this "how likely" as a probability is the job of a language model. Writing text is nothing more than repeating this game one word (token) at a time. In this lecture, after nailing down this single most important sentence of the course, we use a timeline to see the big picture: the only thing that changed over 100 years is how context is remembered. We also introduce the map of all 8 sections, the analogy of how a reader remembers a book, and three promises: keep math to a minimum, one idea per slide, and always say why.
In 1913, Markov counted the letters of Pushkin's poetry by hand and created the Markov chain: the idea that what comes next is determined only by the last few things. Shannon's 1948 experiment showed that the wider the window you look at, the more English-like the generated strings become. In this lecture, using just five sentences as training data, we count what comes after "cat" and divide, then multiply to get the likelihood of an entire sentence. After confirming that the N-gram idea still lives on in phone autocomplete and search suggestions, we pin down its two limits, that unseen combinations get a probability of zero and that distant context cannot be remembered, as the starting point for the next technique. It also introduces a hands-on exercise that runs about 20 lines of Python in Google Colab.
In N-grams, "cat" and "dog" were completely unrelated symbols. Embeddings, which turn words into sequences of numbers (vectors) that carry meaning, let us treat similar words as similar. We also cover the famous word2vec result: king − man + woman ≈ queen. Next, we understand the RNN, which reads a sentence in order while continuously summarizing it into a single memo, and the vanishing gradient problem, where repeated multiplication makes distant information disappear, through the analogy of a game of telephone. As the solution, we learn the LSTM, whose original journal paper appeared in 1997 and later extended with a forget gate, in its standard form with a memory cell and three gates, and its simplified cousin the GRU. The gate idea learned here, adjusting the flow of information with a dial from 0 to 1, is carried directly into Gated DeltaNet and Gated Attention in the second half of the course.
In 2014, seq2seq connected a "reading RNN" to a "writing RNN" and solved translation as a sequence-to-sequence transformation. But because it packs the entire sentence into a single vector, a bottleneck problem arises: the longer the input, the worse the translation. Just as a human translator looks back at the original text, keep each word's state as a sticky note, and every time you write, score the compatibility, turn the scores into weights with softmax, and look back with a weighted average. This is the idea behind Bahdanau Attention. In this lecture we confirm that its one-line equation boils down to the phrase "look back with a weighted average," and follow how it was found that a dot product is enough to score compatibility. We end at the moment when the RNN's remaining constraint, that it can only compute in order, gives rise to the next question: could a model be built from Attention alone?
The 2017 paper "Attention Is All You Need" made a bold proposal: drop the RNN and gather context using only Self-Attention, where every word looks directly at every other word. Using a library search as the analogy, we learn the roles of the query (the question), the key (the label on the spine), and the value (the contents of the book), and actually compute by hand with small two-dimensional numbers for the three words "cat," "is," and "sleeping." Score with a dot product, turn the scores into weights with softmax, and mix the values. We confirm that these three steps are exactly the paper's famous equation. We then understand the three supporting parts, positional encoding, multi-head, and FFN, as problem-and-solution pairs, and follow how stacking blocks led to GPT-3 and ChatGPT, along with the scaling laws. Finally, we confirm the weaknesses, computation that grows with the square of the context length and the KV cache, which lead into the second half of the course.
Run the English Attention notebook cell by cell. Trace dot products, convert scores to softmax weights, and mix the values to form a new representation. Then compute attention for every query at once and connect the matrix dimensions to the quadratic cost of full attention.
Can't we have both the Transformer's intelligence and the RNN's low cost? This lecture walks through Linear Attention, where removing the softmax turns Attention into an RNN that adds information to a fixed-size memo; S4, which applied the state space models of control engineering to language; and Mamba in 2023, whose "selective" updates change the parameters for every input, making it possible to pick and choose. Using the analogy of a smart summary memo that skips filler words like "um" and "uh" and writes down only the important words, we understand how the cost per word becomes constant. After confirming that Mamba's dial belongs to the same lineage as the LSTM forget gate, we compare the Transformer, good at precise search, with Mamba, good at cheap long-term summarization, and arrive at the conclusion that the answer is not one or the other but a hybrid.
This is the climax of the course. The memo in Linear Attention had two problems: it could not forget and it could not overwrite. Mamba2's gate and DeltaNet's delta-rule writing solve each of these, and combining the two gives Gated DeltaNet. We understand its three operations, decay, erase, and write, through the analogy of a meeting minute-taker. The other component, Gated Attention, adds just one sigmoid faucet at the exit of the search result, which increases expressive power and eliminates the attention sink, where attention piles up on the first token. On top of that, we read through the 48-layer structure of Qwen3-Next, which repeats three Gated DeltaNet layers and one Gated Attention layer, how MoE works, and, following the course materials, Qwen3.5 and Qwen3.8 with its Qwen Sparse Attention and the return of N-gram embeddings. It also introduces a hands-on exercise that verifies the correction behavior with NumPy.
From Markov in 1913 to Qwen3.8 in 2026, we review the entire course with a single timeline and the correspondence table for how a reader remembers a book: a count table, one memo, sticky notes, full-text search, a summary memo, and a summary memo with occasional search. We confirm the 100-year conclusion: the cost per word swung between constant and proportional and settled on "nearly constant plus a little search." Next, we take on a six-question review quiz asking what each of embeddings, LSTM gates, Bahdanau Attention, Transformer, Mamba, and the hybrid solved compared to what came before. Finally, we close by recommending three themes the course did not cover, training, inference and usage, and hands-on practice, along with tackling the original papers.
What happens inside ChatGPT, told through 100 years of history
What exactly is a large language model (LLM) like ChatGPT doing inside? This course aims to let you explain the basic principles in your own words, even if you have no background in programming or math.
The approach is a little unusual. Instead of jumping straight to the latest models, we walk through roughly 100 years of language model history in order, from Markov chains in 1913 to the hybrid architectures of 2026. Every technique was born to solve a problem the previous technique had. When you follow each problem together with its solution, even intimidating cutting-edge techniques fall into place naturally.
Figures, analogies, and a minimum of math
Throughout the course we use a single analogy: "how a reader remembers a book." Looking only at the last few words, summarizing into a single memo, looking back at sticky notes, running a full-text search every time, and returning to a smart summary memo. We understand each model as a different way of remembering.
Math is kept to a minimum, and whenever it is truly necessary we always explain in the order figure, analogy, then equation. The course is built so that the story still holds together if you skip the equations. The only arithmetic you need is addition, multiplication, and a feel for proportions. For Self-Attention, we trace a single hand calculation with small numbers so the mechanism sinks in. Each section ends with a 3-line summary and a quiz, and once you can answer it you are ready to move on.
What you will learn
The starting point: a language model is a "next-word guessing game"
N-grams: the era of counting to predict, and its two limits
Embeddings, RNNs, and LSTM gates: turning words into numbers and remembering as you read
seq2seq and Attention: the idea of looking back at sticky notes with a weighted average
Transformer: query, key, value, Self-Attention, positional encoding, multi-head, FFN, and the weakness called the KV cache
Linear Attention, S4, Mamba: handling long context with a fixed-size state
Gated DeltaNet and Gated Attention: the hybrid of three summary-memo layers and one full-text-search layer, attention sinks, MoE, and a reading of Qwen3-Next / 3.5 / 3.8
By the end of the course, terms like Attention, KV cache, state space model, and MoE that show up in news and paper titles will no longer be intimidating, and when a new model appears you will be able to read it with the question "what did this solve compared to the one before?" The recommended pace is one section per day.