liveBook · Manning

Feed-forward step

As explained in The AI Pocket Book

The transformer update stage that further transforms contextualized embeddings after attention.

The feed-forward step updates token embeddings after attention has decided what matters. It lets information from relevant tokens rub off onto others, producing a more contextualized representation. section 1.20

A simple example: “dog” can make “bark” feel more animal-like, while an irrelevant token like “’s” contributes little. The point is not raw attention scores alone, but the embedding update they drive. section 1.20

This update is applied across all tokens in the prompt, and it can be repeated through multiple transformer layers. Each layer has its own learnable parameters, so later layers can specialize in different contextualization tasks. section 1.20

Figure 1.10 The attention mechanism calculates the relative relevance of all tokens in the context window to contextualize or disambiguate the last token.

Shows attention as the relevance signal that guides contextualization of the last token. section 1.20

How The AI Pocket Book covers it

How deep it goes
Explains the embedding update conceptually, with an example and a note that the step repeats across layers.
Examples
Uses “dog,” “bark,” and “’s” to show how relevance changes the embedding update.
What it assumes
Assumes basic familiarity with tokens and embeddings, and explains contextualization from there.
What you can do after
Operate a transformer layer by understanding how attention-guided updates improve contextualized embeddings.
How it connects
Links attention, contextualization, embedding vectors, and multilayer transformer layers.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The AI Pocket Book. The section links point to the parts of the book it draws on.