The FFN splits into a ‘gate’ and an ‘up’ projection multiplied together. That’s why you see three Linears and a Mul.
Introduced inFeb 2020GLU Variants Improve Transformer
Modern transformer MLPs compute silu(gate_proj(x)) × up_proj(x), then project back down with down_proj. A gated linear unit (SwiGLU when the activation is SiLU). The elementwise multiply lets the network dynamically decide which features to pass, and it consistently beats the classic two-layer ReLU MLP at equal parameter cost. This is why decoder-block MLPs show three Linear layers and a multiply instead of two Linears.
Share of new models that have included a gated MLP (SwiGLU) over time.
Open any of these on hfviewer to find this block in the interactive architecture graph.
Browse all 2301 models with this in the catalog →
hfviewer renders the full architecture of 3,500+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.
Browse all model graphs →