要約
訓練されたトランスモデルに数十万の入力トークンを使用して、推論を実行する需要が高まっています。
この極端なスケールでの推論には、重要な計算リソースが必要であり、商品(つまり、データセンタースケールではない)ハードウェアで長いコンテキストで変圧器を適用することを妨げます。
長いコンテキストで自己関節ベースのトランス語モデルを実行することに関連する推論時間コストに対処し、広く利用可能なハードウェアでの採用を可能にするために、で最も関連性の高いトークンのみに参加することにより、フォワードパスのコストを削減する調整可能なメカニズムを提案します。
Top-K選択メカニズムを使用したすべての世代ステップ。
約16GBのGPU RAMを使用して、最大1Mトークンまでコンテキストウィンドウで推論を実行することにより、私たちの方法で得られる効率の向上を紹介します。
私たちの実験は、モデルがキーと値の数の減少によって引き起こされるスパース性を処理できることを明らかにしています。
入力トークンの2%未満に注意することにより、一般的なベンチマーク(Ruler、Alpacaeval、およびOpen LLMリーダーボード)でモデルパフォーマンスの95%以上を達成します。
要約(オリジナル)
There is growing demand for performing inference with hundreds of thousands of input tokens on trained transformer models. Inference at this extreme scale demands significant computational resources, hindering the application of transformers at long contexts on commodity (i.e not data center scale) hardware. To address the inference time costs associated with running self-attention based transformer language models on long contexts and enable their adoption on widely available hardware, we propose a tunable mechanism that reduces the cost of the forward pass by attending to only the most relevant tokens at every generation step using a top-k selection mechanism. We showcase the efficiency gains afforded by our method by performing inference on context windows up to 1M tokens using approximately 16GB of GPU RAM. Our experiments reveal that models are capable of handling the sparsity induced by the reduced number of keys and values. By attending to less than 2% of input tokens, we achieve over 95% of model performance on common benchmarks (RULER, AlpacaEval, and Open LLM Leaderboard).
arxiv情報
著者 | Ryan Synk,Monte Hoover,John Kirchenbauer,Neel Jain,Alex Stein,Manli Shu,Josue Melendez Sanchez,Ramani Duraiswami,Tom Goldstein |
発行日 | 2025-02-12 15:55:37+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google