ChatPaper.aiChatPaper

PowerInfer: コンシューマー向けGPUを用いた高速大規模言語モデルサービング

PowerInfer: Fast Large Language Model Serving with a Consumer-grade GPU

December 16, 2023
著者: Yixin Song, Zeyu Mi, Haotong Xie, Haibo Chen
cs.AI

要旨

本論文では、コンシューマー向け単一GPUを搭載したパーソナルコンピュータ(PC)上で動作する高速大規模言語モデル(LLM)推論エンジン「PowerInfer」を紹介する。PowerInferの設計の根幹にあるのは、LLM推論に内在する高い局所性を活用するという考え方である。この局所性は、ニューロン活性化におけるべき乗分布として特徴づけられる。この分布は、入力に依存せず常に活性化される少数のニューロン(ホットニューロン)と、特定の入力に応じて変化する大多数のニューロン(コールドニューロン)が存在することを示している。PowerInferはこの知見を活用し、GPU-CPUハイブリッド推論エンジンを設計している。具体的には、ホットニューロンをGPUに事前ロードして高速アクセスを実現し、コールドニューロンはCPUで計算することで、GPUメモリ要求とCPU-GPU間データ転送を大幅に削減している。さらに、PowerInferは適応型予測器とニューロン認識スパース演算子を統合し、ニューロン活性化と計算スパース性の効率を最適化している。評価結果によると、PowerInferは単一のNVIDIA RTX 4090 GPU上で、様々なLLM(OPT-175Bを含む)に対して平均13.20トークン/秒、ピーク時29.08トークン/秒の生成速度を達成し、トップクラスのサーバー向けA100 GPUの性能と比べてわずか18%低い結果を示した。これは、モデルの精度を維持しつつ、llama.cppを最大11.69倍上回る性能である。
English
This paper introduces PowerInfer, a high-speed Large Language Model (LLM) inference engine on a personal computer (PC) equipped with a single consumer-grade GPU. The key underlying the design of PowerInfer is exploiting the high locality inherent in LLM inference, characterized by a power-law distribution in neuron activation. This distribution indicates that a small subset of neurons, termed hot neurons, are consistently activated across inputs, while the majority, cold neurons, vary based on specific inputs. PowerInfer exploits such an insight to design a GPU-CPU hybrid inference engine: hot-activated neurons are preloaded onto the GPU for fast access, while cold-activated neurons are computed on the CPU, thus significantly reducing GPU memory demands and CPU-GPU data transfers. PowerInfer further integrates adaptive predictors and neuron-aware sparse operators, optimizing the efficiency of neuron activation and computational sparsity. Evaluation shows that PowerInfer attains an average token generation rate of 13.20 tokens/s, with a peak of 29.08 tokens/s, across various LLMs (including OPT-175B) on a single NVIDIA RTX 4090 GPU, only 18% lower than that achieved by a top-tier server-grade A100 GPU. This significantly outperforms llama.cpp by up to 11.69x while retaining model accuracy.
PDF444December 15, 2024