長文脈大規模モデルのためのブロック並列Transformer
Blockwise Parallel Transformer for Long Context Large Models
May 30, 2023
著者: Hao Liu, Pieter Abbeel
cs.AI
要旨
Transformerは、最先端の自然言語処理モデルの基盤として登場し、幅広いAIアプリケーションで卓越した性能を発揮しています。しかし、Transformerの自己注意機構と大規模なフィードフォワードネットワークがもたらすメモリ要求は、長いシーケンスを処理する能力を制限し、複数の長いシーケンスや長期的な依存関係を伴うタスクにおいて課題を生み出しています。本論文では、ブロック単位の自己注意計算とフィードフォワードネットワークの融合を活用してメモリコストを最小化する、Blockwise Parallel Transformer(BPT)という独自のアプローチを提案します。BPTは、メモリ効率を維持しながらより長い入力シーケンスを処理することで、従来のTransformerと比べて最大32倍、既存のメモリ効率化手法と比べて2~4倍長いシーケンスの学習を可能にします。言語モデリングと強化学習タスクにおける広範な実験を通じて、BPTがメモリ要件を削減し、性能を向上させる効果を実証しています。
English
Transformers have emerged as the cornerstone of state-of-the-art natural
language processing models, showcasing exceptional performance across a wide
range of AI applications. However, the memory demands posed by the
self-attention mechanism and the large feedforward network in Transformers
limit their ability to handle long sequences, thereby creating challenges for
tasks involving multiple long sequences or long-term dependencies. We present a
distinct approach, Blockwise Parallel Transformer (BPT), that leverages
blockwise computation of self-attention and feedforward network fusion to
minimize memory costs. By processing longer input sequences while maintaining
memory efficiency, BPT enables training sequences up to 32 times longer than
vanilla Transformers and 2 to 4 times longer than previous memory-efficient
methods. Extensive experiments on language modeling and reinforcement learning
tasks demonstrate the effectiveness of BPT in reducing memory requirements and
improving performance.