Positive activation Negative activation Active token (highlighted)
drag heatmap to pan · click a row to select a token

Transformer Feed-Forward Block (2D): Per-Token Expand & Project

Attention gets most of the attention, but roughly two-thirds of a transformer's parameters live in its other sublayer: the position-wise feed-forward network. This 2D simulator renders every token's vector as a column of bars and runs it through the real two-layer MLP — expand to dff, apply GELU or ReLU, project back to dmodel, add the residual — independently for each position. A draggable hidden-unit heatmap and an activation-curve plot make the per-token sparsity and the shape of the nonlinearity visible at a glance.