EdgeMoE: Empowering Sparse Large Language Models on Mobile Devices

要約

GPTSやMixTral-8X7Bなどの大規模な言語モデル(LLM)は、ジェネリックMLタスクの例外的な能力により、機械の知能に革命をもたらしました。
データセンターからエッジデバイスへのLLMを通過すると、プライバシーや可用性の向上などのメリットがもたらされますが、大規模なパラメーターサイズ、したがって耐え難いランタイムコストに挑戦しています。
この目的のために、Edgemoeは、ExgemoeであるEdgemoe、Expert-of-Expert(MOE)LLMの混合用デバイス推論エンジンです。これは、ほぼ一定のコンピューティングの複雑さでパラメーターサイズをスケーリングするスパースLLMの一般的な形式です。
Edgemoeは、モデルをストレージ階層に分割することにより、メモリと計算効率の両方を達成します。非専門家の重みはデバイスメモリに保持されます。
一方、エキスパートウェイトは外部ストレージに保持され、アクティブ化されたときにのみメモリにフェッチされます。
この設計は、専門家の重みはかさばりがあるが、まばらな活性化のためにまれに使用されるという重要な観察によって動機付けられています。
専門家のI/Oをさらに削減するために、Edgemoeには2つの新しいテクニックが組み込まれています。(1)専門家のサイズを容認できる精度損失で縮小する専門家ごとのbit幅適応。
(2)アクティブ化された専門家を事前に予測し、Compute-I/Oパイプラインでプリロードする専門家のプリロード。
人気のあるMoe LLMSおよびEdgeデバイスでは、Edgemoeは競争力のあるベースラインよりも大幅なメモリの節約とスピードアップを紹介します。
このコードは、https://github.com/ubiquitouslearning/mllmで入手できます。

要約(オリジナル)

Large language models (LLMs) such as GPTs and Mixtral-8x7B have revolutionized machine intelligence due to their exceptional abilities in generic ML tasks. Transiting LLMs from datacenters to edge devices brings benefits like better privacy and availability, but is challenged by their massive parameter size and thus unbearable runtime costs. To this end, we present EdgeMoE, an on-device inference engine for mixture-of-expert (MoE) LLMs — a popular form of sparse LLM that scales its parameter size with almost constant computing complexity. EdgeMoE achieves both memory- and compute-efficiency by partitioning the model into the storage hierarchy: non-expert weights are held in device memory; while expert weights are held on external storage and fetched to memory only when activated. This design is motivated by a key observation that expert weights are bulky but infrequently used due to sparse activation. To further reduce the expert I/O swapping overhead, EdgeMoE incorporates two novel techniques: (1) expert-wise bitwidth adaptation that reduces the expert sizes with tolerable accuracy loss; (2) expert preloading that predicts the activated experts ahead of time and preloads it with the compute-I/O pipeline. On popular MoE LLMs and edge devices, EdgeMoE showcase significant memory savings and speedup over competitive baselines. The code is available at https://github.com/UbiquitousLearning/mllm.

arxiv情報

著者 Rongjie Yi,Liwei Guo,Shiyun Wei,Ao Zhou,Shangguang Wang,Mengwei Xu
発行日 2025-03-07 11:16:40+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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