Every large language model this course wires into something useful is,
underneath, the same object deep-learning chapters 17 through 21 already
built: a Transformer trained to predict the next token given the ones
before it. This chapter is not a re-teaching of that architecture. It is a
fast, working-depth pass through the seven ideas the rest of this course
leans on constantly -- where an LLM sits on the field's own map, language
modeling as next-token prediction, why sparse word-count representations
fall short, tokens and embeddings, why a fixed-size summary eventually
breaks down, attention computed by hand on numbers small enough to check
with a pencil, the decoder-only Transformer block every deployed model
actually is, and softmax/cross-entropy one more time -- each restated
here in this course's own voice and pointed at exactly where it gets used
starting Chapter 01.
If a fact here feels familiar from deep-learning, that is intentional:
this chapter still states it, still works a fresh numerical example, and
still explains why it matters for this course's job, rather than
sending you elsewhere to find it. The one genuinely new material is
Section 3's primer on sparse, word-count representations (bag-of-words,
TF-IDF) -- a classical idea deep-learning never needed and this course
only needs at working depth, since the full treatment belongs to
natural-language-processing.
Section 1 draws the map this whole field sits on and names what this
course adds beyond a Transformer's own architecture. Section 2 makes
"language model" precise: a probability distribution over token
sequences, scored by perplexity. Section 3 is the one new primer. Section
4 recalls tokens and embeddings. Sections 5 through 7 recall recurrence,
attention, and the decoder-only Transformer block -- the machinery every
model in this course actually runs. Section 8 closes with softmax and
cross-entropy, one more time, setting up Chapter 3's own treatment of how
a model turns those probabilities into generated text. Deeper background
and full derivations stay one pointer away in deep-learning; nothing in
this chapter depends on you opening it.