プリンキピア

第11章注意機構とTransformer

11.9. Large-Scale Pretraining with Transformers11.9 Transformerによる大規模な事前学習

So far in our image classification and machine translation experiments, models have been trained on datasets with input–output examples from scratch to perform specific tasks. For example, a Transformer was trained with English–French pairs (Section 11.7) so that this model can translate input English text into French. As a result, each model becomes a specific expert that is sensitive to even a slight shift in data distribution (Section 4.7). For better generalized models, or even more competent generalists that can perform multiple tasks with or without adaptation, pretraining models on large data has been increasingly common.
英語のヒント
これまでの画像分類と機械翻訳の実験では、モデルは、特定の課題をこなすために、入力と出力の事例をもつデータセットでゼロから訓練されてきた。たとえば、Transformerを英語とフランス語の組で訓練し(11.7節)、このモデルが入力の英語のテキストをフランス語に翻訳できるようにした。その結果、各モデルは、データの分布のわずかなずれ(4.7節)にさえ敏感な、特定の専門家になる。もっとよく汎化するモデル、あるいは適応してもしなくても複数の課題をこなせる、もっと有能なゼネラリストを得るため、大きなデータでモデルを事前学習することがますます一般的になってきた。
Given larger data for pretraining, the Transformer architecture performs better with an increased model size and training compute, demonstrating superior scaling behavior. Specifically, performance of Transformer-based language models scales as a power law with the amount of model parameters, training tokens, and training compute (Kaplan et al., 2020). The scalability of Transformers is also evidenced by the significantly boosted performance from larger vision Transformers trained on larger data (discussed in Section 11.8). More recent success stories include Gato, a generalist model that can play Atari, caption images, chat, and act as a robot (Reed et al., 2022). Gato is a single Transformer that scales well when pretrained on diverse modalities, including text, images, joint torques, and button presses. Notably, all such multimodal data is serialized into a flat sequence of tokens, which can be processed akin to text tokens (Section 11.7) or image patches (Section 11.8) by Transformers.
英語のヒント
事前学習のためのデータがもっと大きいと、Transformerの構造は、モデルの大きさと訓練の計算量を増やすほど性能がよくなり、優れたスケーリングのふるまいを示す。具体的には、Transformerにもとづく言語モデルの性能は、モデルのパラメータ、訓練トークン、訓練の計算量に対してべき乗則でスケールする(Kaplan et al., 2020)。Transformerのスケーラビリティは、もっと大きなデータで訓練したもっと大きな視覚のTransformerで性能が大きく上がること(11.8節で論じた)にも表れている。もっと最近の成功例には、Atariをプレイし、画像にキャプションをつけ、チャットし、ロボットとして行動できるゼネラリストのモデル、Gatoがある(Reed et al., 2022)。Gatoは一つのTransformerであり、テキスト、画像、関節のトルク、ボタンの押下を含む多様なモダリティで事前学習すると、よくスケールする。特に、こうしたマルチモーダルのデータはすべて平らなトークンの系列に直列化され、Transformerによって、テキストのトークン(11.7節)や画像のパッチ(11.8節)と同じように処理できる。
Prior to the compelling success of pretraining Transformers for multimodal data, Transformers were extensively pretrained with a wealth of text. Originally proposed for machine translation, the Transformer architecture in Fig. 11.7.1 consists of an encoder for representing input sequences and a decoder for generating target sequences. Primarily, Transformers can be used in three different modes: encoder-only, encoder–decoder, and decoder-only. To conclude this chapter, we will review these three modes and explain the scalability in pretraining Transformers.
英語のヒント
マルチモーダルのデータでのTransformerの事前学習が目覚ましく成功する前、Transformerは大量のテキストで広く事前学習されていた。もともと機械翻訳のために提案された図11.7.1のTransformerの構造は、入力系列を表すエンコーダと、目標系列を生成するデコーダからなる。主に、Transformerは三つの異なるモードで使える。エンコーダのみ、エンコーダ・デコーダ、デコーダのみである。この章のしめくくりとして、これら三つのモードを振り返り、Transformerの事前学習のスケーラビリティを説明する。