TransNormerを1750億パラメータにスケーリング
Scaling TransNormer to 175 Billion Parameters
July 27, 2023
著者: Zhen Qin, Dong Li, Weigao Sun, Weixuan Sun, Xuyang Shen, Xiaodong Han, Yunshen Wei, Baohong Lv, Fei Yuan, Xiao Luo, Yu Qiao, Yiran Zhong
cs.AI
要旨
我々はTransNormerLLMを発表します。これは、従来のソフトマックスアテンションベースのモデルを精度と効率の両面で上回る、初の線形アテンションベースの大規模言語モデル(LLM)です。TransNormerLLMは、以前の線形アーキテクチャであるTransNormerを進化させ、位置埋め込み、線形アテンションの高速化、ゲーティングメカニズム、テンソル正規化、推論の高速化と安定化といった高度な改良を加えています。具体的には、LRPEと指数減衰を組み合わせることで、トークン間のグローバルな相互作用を維持しつつ、アテンションの希釈問題を回避します。さらに、我々はLightning Attentionを提案します。これは、線形アテンションの実行時間を2倍以上高速化し、メモリ使用量を驚異的な4分の1に削減する最先端の技術です。TransNormerの性能をさらに向上させるため、ゲーティングメカニズムを活用してトレーニングをスムーズにし、新しいテンソル正規化スキームを導入してモデルを高速化し、20%以上の印象的な高速化を実現しました。さらに、シーケンス長に関係なく数値的安定性と一貫した推論速度を保証する堅牢な推論アルゴリズムを開発し、トレーニングと推論の両段階で優れた効率性を示しています。我々のモデル設計の核心はスケーラビリティにあり、大規模クラスターへのシームレスなデプロイメントを可能にし、さらに大規模なモデルへの拡張を容易にします。これらすべてを、優れたパフォーマンス指標を維持しながら実現します。我々のモデル設計は、6TBを超えるサイズと2兆トークン以上を含む自己収集コーパスを用いた一連の包括的な実験を通じて厳密に検証されています。データの品質と関連性を確保するため、収集したデータをフィルタリングする新しい自己清浄戦略を実施しています。我々の事前学習済みモデルは、効率的なLLMのコミュニティの発展を促進するために公開されます。
English
We present TransNormerLLM, the first linear attention-based Large Language
Model (LLM) that outperforms conventional softmax attention-based models in
terms of both accuracy and efficiency. TransNormerLLM evolves from the previous
linear attention architecture TransNormer by making advanced modifications that
include positional embedding, linear attention acceleration, gating mechanism,
tensor normalization, inference acceleration and stabilization. Specifically,
we use LRPE together with an exponential decay to avoid attention dilution
issues while allowing the model to retain global interactions between tokens.
Additionally, we propose Lightning Attention, a cutting-edge technique that
accelerates linear attention by more than twice in runtime and reduces memory
usage by a remarkable four times. To further enhance the performance of
TransNormer, we leverage a gating mechanism to smooth training and a new tensor
normalization scheme to accelerate the model, resulting in an impressive
acceleration of over 20%. Furthermore, we have developed a robust inference
algorithm that ensures numerical stability and consistent inference speed,
regardless of the sequence length, showcasing superior efficiency during both
training and inference stages. Scalability is at the heart of our model's
design, enabling seamless deployment on large-scale clusters and facilitating
expansion to even more extensive models, all while maintaining outstanding
performance metrics. Rigorous validation of our model design is achieved
through a series of comprehensive experiments on our self-collected corpus,
boasting a size exceeding 6TB and containing over 2 trillion tokens. To ensure
data quality and relevance, we implement a new self-cleaning strategy to filter
our collected data. Our pre-trained models will be released to foster community
advancements in efficient LLMs.