passdrill
AI & LLM Engineering · How LLMs Work: Transformers & Training · Card 010/012 easy

In addition to the self-attention sublayer, each Transformer block (Vaswani et al., 2017) contains a position-wise feed-forward network. How is this feed-forward network applied across the sequence?

  1. It is applied identically and independently to each position in the sequence, typically expanding to a larger inner dimension through a nonlinearity before projecting back down
  2. It combines information across all positions simultaneously in the same way self-attention does, making it functionally redundant with the attention sublayer
  3. It only operates on the final position of the sequence, producing a single pooled representation for the entire input
  4. It shares its weights with the token embedding layer so that no additional parameters are introduced by including it
Next card → Shuffle