GLU Attention Improve Transformer

Zehao Wang
6/16/2025
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

Gated Linear Units (GLU) have shown great potential in enhancing neural network performance. In this paper, I introduce a novel attention mechanism called GLU Attention, which introduces nonlinearity into the values of Attention. My experiments demonstrate that GLU Attention improves both model performance and convergence speed across text and vision modalities with zero additional parameters and negligible computational costs. GLU Attention is lightweight and can seamlessly integrate with other technologies, such as Flash Attention, Rotary Position Embedding (RoPE), and various Multi-Head Attention (MHA) variants such as Grouped-Query Attention (GQA). This project is open-sourced at github.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2025attention,
  title  = {GLU Attention Improve Transformer},
  author = {Zehao Wang},
  year   = {2025},
  eprint = {2507.00022},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.00022v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.00022.svg)](https://codeofpaper.com/paper/2507.00022)

Discussion