Jump to content

Gated linear unit (GLU): Difference between revisions

From Wikibase
Plain-text caption (math not rendered in file captions) (via update-page on MediaWiki MCP Server)
Restore TeX in caption (client-side math) (via update-page on MediaWiki MCP Server)
 
Line 1: Line 1:
[[Category:Activation function]]
[[Category:Activation function]]
[[File:GLU-gating-scalar-view.svg|thumbnail|Scalar view with w₁ = 0.8, w₂ = 1.7: the linear branch z·w₁, the sigmoid gate f(z·w₂), and their product GLU(z)]]
[[File:GLU-gating-scalar-view.svg|thumbnail|Scalar view with $w_1=0.8$, $w_2=1.7$: the linear branch $z\,w_1$, the sigmoid gate $f(z\,w_2)$, and their product $\mathrm{GLU}(z)$]]
A gated linear unit (GLU) is a trainable [[activation function]].
A gated linear unit (GLU) is a trainable [[activation function]].



Latest revision as of 11:52, 17 November 2026

Languages: English · français · Esperanto

Scalar view with $w_1=0.8$, $w_2=1.7$: the linear branch $z\,w_1$, the sigmoid gate $f(z\,w_2)$, and their product $\mathrm{GLU}(z)$
Image: Rong Martin-Siebler ZHOU and Veramiko AI · CC BY-SA 4.0
· Open in a new tab

A gated linear unit (GLU) is a trainable activation function.

$$ \operatorname{GLU}(\mathbf{X}) =\left(\mathbf{X}\mathbf{W}_1+\mathbf{1}\vec b_1^{\top}\right) \odot f\left(\mathbf{X}\mathbf{W}_2+\mathbf{1}\vec b_2^{\top}\right). $$

The gating function $f$ is commonly any of


GLUs are found to improve feed-forward sub-layers in Transformers at matched parameter count.[1]