# GELU

- **Canonical URL:** https://getaimath.com/dictionary/gelu/
- **Topics:** [Transformer Architecture](https://getaimath.com/dictionary/category/transformer-architecture/)
- **Last updated:** 2026-11-25

## What is GELU?

**In one sentence:** GELU is a smooth activation function that works like a softer ReLU, letting small negative values through a little.

GELU stands for Gaussian Error Linear Unit. Instead of a sharp cut at zero, it curves gently, which often helps language models train a bit better. It was used in BERT and GPT-2 and GPT-3.

![Transformers & Attention: The Smart Highlighter — Simple cartoon diagram showing how a Transformer reads a whole sentence at once and shines a bright highlighter beam from the word "IT" back to "trophy" so it knows what "IT" means.](https://getaimath.com/diagrams/transformer-architecture.png)
*Napkin Diagram (Transformer Architecture): Older AI read word-by-word and often lost track of earlier words; a Transformer highlights which words connect to which.*

## What is an example of GELU?

GELU turns −1 into about −0.16 instead of 0, and 2 into about 1.95.

## Why does GELU matter?

Small choices like GELU vs ReLU can noticeably improve how well big models learn.

## Related Concepts

- [ReLU](https://getaimath.com/dictionary/relu/): ReLU is a simple activation function that outputs 0 for any negative number and leaves positive numbers unchanged.
- [SwiGLU](https://getaimath.com/dictionary/swiglu/): SwiGLU is an activation design used in many modern LLMs that adds a "gate" so the network can control how much information passes.
- [Activation Function](https://getaimath.com/dictionary/activation-function/): An activation function decides how strongly a neuron "fires" by transforming its total input into its output.
- [Layer Normalization](https://getaimath.com/dictionary/layer-normalization/): Layer normalization rescales the numbers in each layer so they stay in a steady, healthy range during training.
- [Multi-Layer Perceptron (MLP)](https://getaimath.com/dictionary/multi-layer-perceptron-mlp/): A multi-layer perceptron is a basic neural network made of layers of neurons where every neuron connects to every neuron in the next layer.
- [RMSNorm](https://getaimath.com/dictionary/rmsnorm/): RMSNorm is a simpler, faster version of layer normalization that only rescales numbers by their overall size.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/gelu/)
