Fundamentals · Part 5How LLMs Work
Attention Explained: Queries, Keys and Values
How attention lets each token pull in context: queries, keys and values worked by hand, why we divide by √d, the causal mask, and the length-squared cost.
2 articles.
Fundamentals · Part 5How LLMs Work
How attention lets each token pull in context: queries, keys and values worked by hand, why we divide by √d, the causal mask, and the length-squared cost.
Fundamentals · Part 6How LLMs Work
How a Transformer block works: many attention heads, the MLP, residual connections and layer norm, with shapes and a full GPT-2 parameter count.