Norms & blocks

Gated MLP (SwiGLU)

The FFN splits into a ‘gate’ and an ‘up’ projection multiplied together. That’s why you see three Linears and a Mul.

First page of GLU Variants Improve TransformerIntroduced inFeb 2020GLU Variants Improve TransformerShazeer · arXiv 2002.05202 ↗
Gated MLP (SwiGLU): the gate opens and closes the flowgate path applies SiLU, then multiplies with up_proj before down_projgate_projup_projdown_projSiLU×silu(gate_proj(x)) × up_proj(x) flows through down_proj

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.

Adoption over time

Share of new models that have included a gated MLP (SwiGLU) over time.

64%2022202320242025202664%20222023202420252026

See it in real models

Open any of these on hfviewer to find this block in the interactive architecture graph.

Qwen/Qwen3-0.6B architecture graphQwen/Qwen3-0.6Btext-generation · ↓ 29.9M · ♡ 2kOpen in visualizer Comfy-Org/MiniMax-H3 architecture graphComfy-Org/MiniMax-H3↓ 23.3M · ♡ 2kOpen in visualizer google/vit-base-patch16-224 architecture graphgoogle/vit-base-patch16-224image-classification · ↓ 15.4M · ♡ 1kOpen in visualizer openai-community/gpt2 architecture graphopenai-community/gpt2text-generation · ↓ 15.1M · ♡ 4kOpen in visualizer Qwen/Qwen3-4B architecture graphQwen/Qwen3-4Btext-generation · ↓ 11.6M · ♡ 761Open in visualizer Qwen/Qwen2.5-7B-Instruct architecture graphQwen/Qwen2.5-7B-Instructtext-generation · ↓ 9.7M · ♡ 2kOpen in visualizer Qwen/Qwen3-8B architecture graphQwen/Qwen3-8Btext-generation · ↓ 9.4M · ♡ 2kOpen in visualizer Qwen/Qwen3-Embedding-0.6B architecture graphQwen/Qwen3-Embedding-0.6Bfeature-extraction · ↓ 8.7M · ♡ 1kOpen in visualizer Qwen/Qwen3.5-9B architecture graphQwen/Qwen3.5-9Bimage-text-to-text · ↓ 8.6M · ♡ 2kOpen in visualizer Qwen/Qwen2.5-0.5B-Instruct architecture graphQwen/Qwen2.5-0.5B-Instructtext-generation · ↓ 8.5M · ♡ 631Open in visualizer google/gemma-4-31B-it architecture graphgoogle/gemma-4-31B-itimage-text-to-text · ↓ 8.3M · ♡ 4kOpen in visualizer Qwen/Qwen3.5-4B architecture graphQwen/Qwen3.5-4Bimage-text-to-text · ↓ 7.9M · ♡ 1kOpen in visualizer

View 4,532 catalog matches for Gated MLP (SwiGLU) →

Related concepts

hfviewer renders the full architecture of 9,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 →