ChatPaper.aiChatPaper

TPI-LLM: 低リソースのエッジデバイスで70BスケールのLLMを効率的に処理する

TPI-LLM: Serving 70B-scale LLMs Efficiently on Low-resource Edge Devices

October 1, 2024
著者: Zonghang Li, Wenjiao Feng, Mohsen Guizani, Hongfang Yu
cs.AI

要旨

大規模モデルの推論は、ユーザーの相互作用データのプライバシーに関する懸念から、クラウドからエッジへと移行しています。ただし、エッジデバイスはしばしば限られた計算能力、メモリ、および帯域幅に苦しんでおり、LLM推論を実行し高速化するために複数のデバイス間での協力が必要です。主流の解決策であるパイプライン並列処理は、単一ユーザーのシナリオには効率的ではありませんが、テンソル並列処理は頻繁な通信に苦しんでいます。本論文では、低リソースデバイスにおいてパイプラインよりもテンソル並列処理の方が効果的であると主張し、70Bスケールのモデルを処理するための計算およびメモリ効率の良いテンソル並列推論システムであるTPI-LLMを提案します。TPI-LLMは、ユーザーのデバイス内で機密性の高い生データを保持し、推論中にレイヤーの重みを動的に管理するためのスライディングウィンドウメモリスケジューラを導入し、ディスクI/Oの遅延を計算および通信と重ね合わせます。これにより、メモリ制限のあるデバイスでも大規模モデルをスムーズに実行できます。通信のボトルネックを分析し、リンクの遅延が帯域幅ではなく主要な問題となることを発見し、スターベースのオールリデュースアルゴリズムを実装します。エミュレートおよび実際のテストベッドでの幅広い実験により、TPI-LLMは、Accelerateに比べて80%以上の最初のトークンまでの時間とトークンの遅延が短縮され、TransformersおよびGalaxyに比べて90%以上の結果を示し、70BスケールのLlama 2-70Bのピークメモリフットプリントを90%削減し、70Bスケールのモデルに対してわずか3.1GBのメモリを必要とします。
English
Large model inference is shifting from cloud to edge due to concerns about the privacy of user interaction data. However, edge devices often struggle with limited computing power, memory, and bandwidth, requiring collaboration across multiple devices to run and speed up LLM inference. Pipeline parallelism, the mainstream solution, is inefficient for single-user scenarios, while tensor parallelism struggles with frequent communications. In this paper, we argue that tensor parallelism can be more effective than pipeline on low-resource devices, and present a compute- and memory-efficient tensor parallel inference system, named TPI-LLM, to serve 70B-scale models. TPI-LLM keeps sensitive raw data local in the users' devices and introduces a sliding window memory scheduler to dynamically manage layer weights during inference, with disk I/O latency overlapped with the computation and communication. This allows larger models to run smoothly on memory-limited devices. We analyze the communication bottleneck and find that link latency, not bandwidth, emerges as the main issue, so a star-based allreduce algorithm is implemented. Through extensive experiments on both emulated and real testbeds, TPI-LLM demonstrated over 80% less time-to-first-token and token latency compared to Accelerate, and over 90% compared to Transformers and Galaxy, while cutting the peak memory footprint of Llama 2-70B by 90%, requiring only 3.1 GB of memory for 70B-scale models.

Summary

AI-Generated Summary

PDF338November 13, 2024