# SwiGLU

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

## What is SwiGLU?

**In one sentence:** SwiGLU is an activation design used in many modern LLMs that adds a "gate" so the network can control how much information passes.

It splits the signal into two paths: one is the information, the other is a gate that decides how much of it to let through. This extra control usually makes models learn better for the same cost.

![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 SwiGLU?

Llama, Mistral and many other modern models use SwiGLU in their feed-forward layers.

## Why does SwiGLU matter?

SwiGLU is part of why newer models get more ability out of the same number of parameters.

## Related Concepts

- [GELU](https://getaimath.com/dictionary/gelu/): GELU is a smooth activation function that works like a softer ReLU, letting small negative values through a little.
- [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.
- [ReLU](https://getaimath.com/dictionary/relu/): ReLU is a simple activation function that outputs 0 for any negative number and leaves positive numbers unchanged.
- [RMSNorm](https://getaimath.com/dictionary/rmsnorm/): RMSNorm is a simpler, faster version of layer normalization that only rescales numbers by their overall size.
- [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.
- [Residual Connection](https://getaimath.com/dictionary/residual-connection/): A residual connection lets a layer's input skip ahead and be added to its output, creating a shortcut through the network.

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