AnyLearn
All lessons

attention

6 free lessons tagged attention across AI, Robotics. Each one is a short sequence of focused steps with narration and a five-question quiz at the end — take them in any order, no signup required.

AI
advanced

Linear Attention: Removing the Softmax Buys Associativity

Softmax is the one operation forcing attention to materialise an n-by-n matrix. Remove it and associativity lets you rebracket the product so a fixed-size quantity is maintained instead. This lesson derives that step, shows why the result is a recurrent network with a matrix-valued state, explains the two computation modes, and is honest about what the softmax was doing.

10 steps·~15 min
AI
advanced

What Attention Costs, and the Trilemma Underneath

Attention costs two separate things people conflate: quadratic compute during training, and a cache that grows without bound during inference. At a million tokens that cache is 344 GB while a recurrent state is 16.8 MB and constant. This lesson separates the two costs, shows why the classical RNN alternative failed, and states the trilemma every architecture since has been negotiating.

10 steps·~15 min
Robotics
advanced

Modelling Interaction: From Social Forces to Social Pooling

How the field learned to represent people influencing each other: the physics-inspired force model, the Social LSTM pooling layer that replaced hand-designed rules with learned ones, and the attention and graph architectures that followed.

8 steps·~12 min
AI
advanced

Circuits: Reverse-Engineering Transformer Algorithms

How attention heads read and write to a shared residual stream, how they compose into circuits, and the two best-understood examples: the induction head behind in-context learning and the indirect object identification circuit in GPT-2.

9 steps·~14 min
AI
intermediate

Modern LLM Architectures: From Decoder-Only to Mixture-of-Experts

A deep tour of the architectural choices powering today's large language models — decoder-only Transformers, encoder-decoder designs, grouped-query attention, RoPE positional embeddings, and mixture-of-experts routing — with concrete numbers and trade-offs.

12 steps·~18 min
AI
intermediate

Attention and Transformers

From the limits of RNNs to the self-attention mechanism that replaced them. Learn how queries, keys, and values implement scaled dot-product attention, why multi-head attention captures richer structure, how positional encodings inject order, and how all of this assembles into a transformer block.

9 steps·~14 min

Related topics