Trainable Transformer in Transformer

要約

最近の研究では、大規模な事前トレーニング済み言語モデルにおけるインコンテキスト学習 (ICL) の機能は、推論中に内部モデル (線形または 2 層 MLP など) を暗黙的にシミュレートし、微調整することに起因すると考えられています。
ただし、このような構築には大きなメモリ オーバーヘッドが必要となるため、より洗練された内部モデルのシミュレーションが困難になります。
この研究では、効率的な構築である Transformer in Transformer (要するに TinT) を提案します。これにより、トランスフォーマーが推論中に複雑なモデル (事前トレーニングされた言語モデルなど) を内部的にシミュレートし、微調整できるようになります。
特に、20 億未満のパラメーターを持つ TinT モデルが 1 億 2,500 万パラメーターのトランスフォーマー モデルを単一の順方向パス内でシミュレートおよび微調整できるようにする革新的な近似手法を導入します。
TinT は多くの一般的な変圧器のバリエーションに対応しており、その設計アイデアにより、変圧器内の単純なモデルの過去のインスタンス化の効率も向上します。
私たちはエンドツーエンドの実験を実施し、さまざまな言語モデリングと下流タスクにおける TinT の内部微調整手順を検証します。
たとえば、ワンステップの予算が限られている場合でも、OPT-125M モデルの TinT は OPT-125M と比較して絶対平均 4 ~ 16% パフォーマンスを向上させることが観察されています。
これらの発見は、大規模な事前トレーニング済み言語モデルが複雑なサブルーチンを実行できることを示唆しています。
さらなる作業を容易にするために、TinT 用のモジュール式で拡張可能なコードベースが含まれています。

要約(オリジナル)

Recent works attribute the capability of in-context learning (ICL) in large pre-trained language models to implicitly simulating and fine-tuning an internal model (e.g., linear or 2-layer MLP) during inference. However, such constructions require large memory overhead, which makes simulation of more sophisticated internal models intractable. In this work, we propose an efficient construction, Transformer in Transformer (in short, TinT), that allows a transformer to simulate and fine-tune complex models internally during inference (e.g., pre-trained language models). In particular, we introduce innovative approximation techniques that allow a TinT model with less than 2 billion parameters to simulate and fine-tune a 125 million parameter transformer model within a single forward pass. TinT accommodates many common transformer variants and its design ideas also improve the efficiency of past instantiations of simple models inside transformers. We conduct end-to-end experiments to validate the internal fine-tuning procedure of TinT on various language modeling and downstream tasks. For example, even with a limited one-step budget, we observe TinT for a OPT-125M model improves performance by 4-16% absolute on average compared to OPT-125M. These findings suggest that large pre-trained language models are capable of performing intricate subroutines. To facilitate further work, a modular and extensible codebase for TinT is included.

arxiv情報

著者 Abhishek Panigrahi,Sadhika Malladi,Mengzhou Xia,Sanjeev Arora
発行日 2023-07-03 17:53:39+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク