Transformers without Normalization - DynamicTanh - DyT
Normalization layers are ubiquitous in modern neural networks and have long been considered essential. This work demonstrates that Transformers without normalization can achieve the same or better performance using a remarkably simple technique. We introduce Dynamic Tanh (DyT), an element-wise operation DyT ( \boldsymbol 𝑥 ) = tanh ( 𝛼 \boldsymbol 𝑥 ) , as a drop-in replacement for normalization layers in Transformers. DyT is inspired by the observation that layer normalization in Transformers often produces tanh-like, S-shaped input-output mappings. By incorporating DyT, Transformers without normalization can match or exceed the performance of their normalized counterparts, mostly without hyperparameter tuning. We validate the effectiveness of Transformers with DyT across diverse settings, ranging from recognition to generation, supervised to self-supervised learning, and computer vision to language models. These findings challenge the conventional understanding that normalizatio
Transformers without Normalization - DynamicTanh - DyT Left: original Transformer block. Right: block with our proposed Dynamic Tanh (DyT) layer. DyT is a straightforward replacement for commonly used Layer Norm or RMSNorm layers. Transformers with DyT match or exceed the performance of their normalized counterparts. Abstract Normalization layers are ubiquitous in modern neural networks and have long been considered essential. This work demonstrates that Transformers without normalization can achieve the same or better performance using a remarkably simple technique. We introduce Dynamic Tanh
Explore this link on the map →related reading
- A Mathematical Framework for Transformer Circuitstransformer-circuits.pub
- The Annotated Transformernlp.seas.harvard.edu
- Transformers from Scratche2eml.school
- Annotated Research Paper Implementations: Transformers, StyleGAN, Stable Diffusion, DDPM/DDIM, LayerNorm, Nucleus Sampling and morenn.labml.ai
- Inside the Transformer: The Life of a Token - Aleksa Gordićaleksagordic.com
- Transformer (deep learning) - Wikipediaen.wikipedia.org
- The Annotated Transformernlp.seas.harvard.edu
- Transformer Circuits Threadtransformer-circuits.pub
- Transformers from scratch | peterbloem.nlpeterbloem.nl
- Transformer Explainer: LLM Transformer Model Visually Explainedpoloclub.github.io
- Transformer (deep learning) - Wikipediaen.wikipedia.org
- Everything About Transformerskrupadave.com