Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efficiently Scaling Transformer Inference, Reiner Pope+, N/A, arXiv'22 #601

Open
AkihikoWatanabe opened this issue Apr 30, 2023 · 1 comment
Labels

Comments

@AkihikoWatanabe
Copy link
Owner

AkihikoWatanabe commented Apr 30, 2023

URL

Affiliations

  • Reiner Pope, N/A
  • Sholto Douglas, N/A
  • Aakanksha Chowdhery, N/A
  • Jacob Devlin, N/A
  • James Bradbury, N/A
  • Anselm Levskaya, N/A
  • Jonathan Heek, N/A
  • Kefan Xiao, N/A
  • Shivani Agrawal, N/A
  • Jeff Dean, N/A

Abstract

  • We study the problem of efficient generative inference for Transformermodels, in one of its most challenging settings: large deep models, with tightlatency targets and long sequence lengths. Better understanding of theengineering tradeoffs for inference for large Transformer-based models isimportant as use cases of these models are growing rapidly throughoutapplication areas. We develop a simple analytical model for inferenceefficiency to select the best multi-dimensional partitioning techniquesoptimized for TPU v4 slices based on the application requirements. We combinethese with a suite of low-level optimizations to achieve a new Pareto frontieron the latency and model FLOPS utilization (MFU) tradeoffs on 500B+ parametermodels that outperforms the FasterTransformer suite of benchmarks. We furthershow that with appropriate partitioning, the lower memory requirements ofmultiquery attention (i.e. multiple query heads share single key/value head)enables scaling up to 32x larger context lengths. Finally, we achieve alow-batch-size latency of 29ms per token during generation (using int8 weightquantization) and a 76% MFU during large-batch-size processing of input tokens,while supporting a long 2048-token context length on the PaLM 540B parametermodel.

Translation (by gpt-3.5-turbo)

  • 本研究では、Transformerモデルの効率的な生成推論の問題を、最も厳しい状況の1つである、大規模な深層モデル、タイトなレイテンシーターゲット、長いシーケンス長に対して研究しています。これらのモデルの使用例がアプリケーション領域全体で急速に増加しているため、大規模Transformerベースのモデルの推論のエンジニアリングのトレードオフをより良く理解することが重要です。我々は、アプリケーション要件に基づいてTPU v4スライスに最適化された最良の多次元分割技術を選択するための推論効率のための単純な解析モデルを開発しました。これらを低レベルの最適化と組み合わせることで、500B+パラメータモデルのレイテンシーとモデルFLOPS利用率のトレードオフにおいて、FasterTransformerベンチマークスイートを上回る新しいParetoフロンティアを実現しました。さらに、適切な分割により、マルチクエリアテンション(複数のクエリヘッドが単一のキー/バリューヘッドを共有する)の低いメモリ要件により、32倍の大きなコンテキスト長にスケーリングすることができることを示しました。最後に、int8ウェイト量子化を使用した生成中の低バッチサイズレイテンシーは、トークンあたり29msであり、入力トークンの大バッチサイズ処理において76%のMFUを実現し、PaLM 540Bパラメータモデルにおいて2048トークンの長いコンテキスト長をサポートしています。

Summary (by gpt-3.5-turbo)

    • 大規模Transformerベースのモデルの推論のエンジニアリングのトレードオフを理解するために、最適な多次元分割技術を選択するための単純な解析モデルを開発
  • 低レベルの最適化と組み合わせることで、500B+パラメータモデルのレイテンシーとモデルFLOPS利用率のトレードオフにおいて、FasterTransformerベンチマークスイートを上回る新しいParetoフロンティアを実現
  • 適切な分割により、マルチクエリアテンションの低いメモリ要件により、32倍の大きなコンテキスト長にスケーリング可能
  • int8ウェイト量子化を使用した生成中の低バッチサイズレイテンシーは、トークンあたり29msであり、入力トークンの大バッチサイズ処理において76%のMFUを実現し、PaLM 540Bパラメータモデルにおいて2048トークンの長いコンテキスト長をサポートしている。
@AkihikoWatanabe AkihikoWatanabe changed the title a Efficiently Scaling Transformer Inference, Reiner Pope+, N/A, arXiv'22 Apr 30, 2023
@AkihikoWatanabe
Copy link
Owner Author

特にMultiquery Attentionという技術がTransformerのinferenceのコスト削減に有効らしい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant