The non-linear activation inside the FFN has evolved through three eras.
ReLU (original Transformer)
max(0, x). Simple, fast. Suffers from "dead neurons" — units that get pushed into the negative regime never recover because their gradient is exactly zero. Used by the 2017 Transformer and many early models, almost no modern LLM uses it.
GELU (GPT-2/3, BERT)
x · Φ(x) where Φ is the standard normal CDF. Smoothly approximates ReLU but the gradient is non-zero everywhere. No dead neurons. Better empirical performance. Used by GPT-2, GPT-3, BERT, RoBERTa, T5.
SwiGLU (modern standard)
Combines Swish (a smooth ReLU variant) with a multiplicative gate. SwiGLU has three weight matrices instead of two — the third one is a "gate" that elementwise modulates the activation:
The gate gives the model fine-grained control over which features to pass through and which to suppress. To keep parameter count comparable to a 4× FFN, d_ff is reduced to ~8/3 × d_model when using SwiGLU. Llama, Mistral, Mixtral, Qwen, Gemma — every modern open-weight LLM uses SwiGLU.