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 · ↓ 23.7M · ♡ 2kOpen in visualizer Comfy-Org/MiniMax-H3 architecture graphComfy-Org/MiniMax-H3↓ 23.3M · ♡ 2kOpen in visualizer Qwen/Qwen3-VL-8B-Instruct architecture graphQwen/Qwen3-VL-8B-Instructimage-text-to-text · ↓ 19.7M · ♡ 1kOpen in visualizer openai-community/gpt2 architecture graphopenai-community/gpt2text-generation · ↓ 15.1M · ♡ 4kOpen in visualizer google/gemma-4-26B-A4B-it architecture graphgoogle/gemma-4-26B-A4B-itimage-text-to-text · ↓ 13.1M · ♡ 2kOpen in visualizer Qwen/Qwen3-8B architecture graphQwen/Qwen3-8Btext-generation · ↓ 12.9M · ♡ 2kOpen in visualizer Qwen/Qwen2.5-7B-Instruct architecture graphQwen/Qwen2.5-7B-Instructtext-generation · ↓ 9.7M · ♡ 2kOpen in visualizer Qwen/Qwen3.5-9B architecture graphQwen/Qwen3.5-9Bimage-text-to-text · ↓ 9.2M · ♡ 2kOpen in visualizer google/gemma-4-31B-it architecture graphgoogle/gemma-4-31B-itimage-text-to-text · ↓ 9.0M · ♡ 4kOpen in visualizer Qwen/Qwen3-Embedding-0.6B architecture graphQwen/Qwen3-Embedding-0.6Bfeature-extraction · ↓ 8.7M · ♡ 1kOpen in visualizer Qwen/Qwen2.5-0.5B-Instruct architecture graphQwen/Qwen2.5-0.5B-Instructtext-generation · ↓ 8.5M · ♡ 631Open in visualizer nvidia/Qwen3.6-35B-A3B-NVFP4 architecture graphnvidia/Qwen3.6-35B-A3B-NVFP4text-generation · ↓ 8.0M · ♡ 628Open in visualizer

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

Related concepts

hfviewer renders the full architecture of 6,800+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.

Browse all model graphs →