Transformers Get Stable: An End-to-End Signal Propagation Theory for Language Models

要約

変圧器モデルは大成功を収めているにもかかわらず、依然として詳細に拡張することが困難です。
この研究では、統一された信号伝播理論を開発し、変圧器モデルを通じて順方向信号と逆方向信号のモーメントを制御する式を提供します。
私たちのフレームワークを使用すると、勾配の消失/爆発、ランクの崩壊、および高い注意スコアに関連する不安定性を理解し、軽減できます。
また、モデル全体でユニット出力/勾配モーメントを保存し、1000 層の非常に深いモデルのトレーニングを可能にする初期化およびスケーリング スキームである DeepScaleLM も提案します。
トランスフォーマー モデルはさらに深くなる可能性があることがわかりました。より少ないパラメーターを備えた深いモデルは、Pre-LN と Pre-LN の両方のエンコーダーのみ、デコーダーのみ、およびエンコーダー-デコーダーのバリアント全体で、言語モデリング、音声翻訳、および画像分類において浅いモデルよりも優れています。
ポスト LN トランスフォーマー、複数のデータセットとモデル サイズに対応。
これらの改善は、下流の質問応答タスクのパフォーマンスの向上と画像分類の堅牢性の向上にもつながります。

要約(オリジナル)

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.

arxiv情報

著者 Akhil Kedia,Mohd Abbas Zaidi,Sushil Khyalia,Jungho Jung,Harshith Goka,Haejun Lee
発行日 2024-07-18 17:59:35+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.CV, cs.LG, I.2.10 パーマリンク