SwiGLU is a gated activation that uses Swish to modulate one linear projection with another. In a Llama-style network, it replaces ReLU, supports negative values, and helps address exploding or vanishing gradients. section 9.2
SwiGLU in a Llama block
A SimpleLlama feed-forward path projects from d_model to hidden_dim, applies SwiGLU, then projects back to d_model. The same activation appears in the model’s final feed-forward network instead of ReLU.
