Educational Cards

Learn from video content, text, and interactive tasks

Filters
Clear
Memorization, privacy, and copyright pressure points

Large models can memorize rare training sequences, including private or licensed text....

Intermediate Machine learning
Bridge to transformer mechanisms

Language models before transformers often used RNNs : a hidden state updated serially along time,...

Intermediate Machine learning
Self-attention mixes tokens via learned compatibilities

Chapter 5 framed language as next-token prediction; this chapter asks how a model can mix...

Intermediate Machine learning
Positional encodings and length generalization

Attention scores depend on content vectors alone unless you tell the model where each token sits in...

Intermediate Machine learning
Transformer block: attention + MLP + residuals + norm

A transformer block stacks two sublayers around a residual highway. First, multi-head...

Intermediate Machine learning
Encoder vs decoder masking

Not every transformer attends the same way. Encoder blocks (BERT-style) use bidirectional...

Intermediate Machine learning
Training stability at scale

Training billion-parameter transformers is as much engineering as theory. AdamW decouples weight...

Intermediate Machine learning
Inference systems: KV-cache and batching

Training processes full sequences in parallel; inference generates one token at a time. Recomputing...

Intermediate Machine learning
Linear projections produce Q, K, V

The previous chapter showed attention as a story; this one implements it as matrix multiplies....

Advanced Machine learning
Score matrix and softmax along keys

Stack all query-key scores into a matrix S in mathbbR^n times n with S_ij = Q_i cdot K_j / sqrtd_k....

Advanced Machine learning
Differentiable key-value lookup view

Attention can be read as a soft dictionary lookup . Keys index rows of a memory table; values store...

Advanced Machine learning
Tensor programs: batch × heads × sequence × dim

Production attention is a stack of GEMMs (general matrix multiplies) on GPU. Typical shapes: batch...

Advanced Machine learning