nGPT: Normalized Transformer with Representation Learning on the Hypersphere
Abstract
We propose a novel neural network architecture, the normalized Transformer (nGPT) with representation learning on the hypersphere. In nGPT, all vectors forming the embeddings, MLP, attention matrices and hidden states are unit norm normalized. The input stream of tokens travels on the surface of a hypersphere, with each layer contributing a displacement towards the target output predictions. These displacements are defined by the MLP and attention blocks, whose vector components also reside on the same hypersphere. Experiments show that nGPT learns much faster, reducing the number of training steps required to achieve the same accuracy by a factor of 4 to 20, depending on the sequence length.
Cite
Text
Loshchilov et al. "nGPT: Normalized Transformer with Representation Learning on the Hypersphere." International Conference on Learning Representations, 2025.Markdown
[Loshchilov et al. "nGPT: Normalized Transformer with Representation Learning on the Hypersphere." International Conference on Learning Representations, 2025.](https://mlanthology.org/iclr/2025/loshchilov2025iclr-ngpt/)BibTeX
@inproceedings{loshchilov2025iclr-ngpt,
title = {{nGPT: Normalized Transformer with Representation Learning on the Hypersphere}},
author = {Loshchilov, Ilya and Hsieh, Cheng-Ping and Sun, Simeng and Ginsburg, Boris},
booktitle = {International Conference on Learning Representations},
year = {2025},
url = {https://mlanthology.org/iclr/2025/loshchilov2025iclr-ngpt/}
}