Gespeichert in:
| Hauptverfasser: | , , , , , |
|---|---|
| Format: | Preprint |
| Veröffentlicht: |
2024
|
| Schlagworte: | |
| Online-Zugang: | https://arxiv.org/abs/2403.09635 |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| _version_ | 1866911960142970880 |
|---|---|
| author | Kedia, Akhil Zaidi, Mohd Abbas Khyalia, Sushil Jung, Jungho Goka, Harshith Lee, Haejun |
| author_facet | Kedia, Akhil Zaidi, Mohd Abbas Khyalia, Sushil Jung, Jungho Goka, Harshith Lee, Haejun |
| contents | In spite of their huge success, transformer models remain difficult to scale in depth. In this work, we develop a unified signal propagation theory and provide formulae that govern the moments of the forward and backward signal through the transformer model. Our framework can be used to understand and mitigate vanishing/exploding gradients, rank collapse, and instability associated with high attention scores. We also propose DeepScaleLM, an initialization and scaling scheme that conserves unit output/gradient moments throughout the model, enabling the training of very deep models with 1000 layers. We find that transformer models could be much deeper - our deep models with fewer parameters outperform shallow models in Language Modeling, Speech Translation, and Image Classification, across encoder-only, decoder-only and encoder-decoder variants, for both Pre-LN and Post-LN transformers, for multiple datasets and model sizes. These improvements also translate into improved performance on downstream Question Answering tasks and improved robustness for Image Classification. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2403_09635 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Transformers Get Stable: An End-to-End Signal Propagation Theory for Language Models Kedia, Akhil Zaidi, Mohd Abbas Khyalia, Sushil Jung, Jungho Goka, Harshith Lee, Haejun Computation and Language Artificial Intelligence Computer Vision and Pattern Recognition Machine Learning I.2.7; I.2.10 In spite of their huge success, transformer models remain difficult to scale in depth. In this work, we develop a unified signal propagation theory and provide formulae that govern the moments of the forward and backward signal through the transformer model. Our framework can be used to understand and mitigate vanishing/exploding gradients, rank collapse, and instability associated with high attention scores. We also propose DeepScaleLM, an initialization and scaling scheme that conserves unit output/gradient moments throughout the model, enabling the training of very deep models with 1000 layers. We find that transformer models could be much deeper - our deep models with fewer parameters outperform shallow models in Language Modeling, Speech Translation, and Image Classification, across encoder-only, decoder-only and encoder-decoder variants, for both Pre-LN and Post-LN transformers, for multiple datasets and model sizes. These improvements also translate into improved performance on downstream Question Answering tasks and improved robustness for Image Classification. |
| title | Transformers Get Stable: An End-to-End Signal Propagation Theory for Language Models |
| topic | Computation and Language Artificial Intelligence Computer Vision and Pattern Recognition Machine Learning I.2.7; I.2.10 |
| url | https://arxiv.org/abs/2403.09635 |