Feed-forward network (FFN)
A small neural network inside each Transformer layer that processes each word independently, after the attention step. It adds capacity for the model to learn complex transformations.
ⓘ Technical definition
Two linear transformations with a ReLU between them, applied position-wise: FFN(x) = max(0, xW₁ + b₁)W₂ + b₂. The inner dimension is typically 4 × d_model.