Turbo Sparse: 最小の活性化パラメータでLLMのSOTA性能を実現
Turbo Sparse: Achieving LLM SOTA Performance with Minimal Activated Parameters
June 10, 2024
著者: Yixin Song, Haotong Xie, Zhengyan Zhang, Bo Wen, Li Ma, Zeyu Mi, Haibo Chen
cs.AI
要旨
活性化のスパース性を活用することは、大規模言語モデル(LLM)の推論プロセスを性能を損なうことなく大幅に加速する有望なアプローチです。しかし、活性化のスパース性は活性化関数によって決定され、SwiGLUやGeGLUなどの一般的に使用される関数は限定的なスパース性しか示しません。これらの関数を単純にReLUに置き換えても十分なスパース性は達成できません。さらに、不十分なトレーニングデータは性能低下のリスクをさらに高める可能性があります。これらの課題に対処するため、我々はLLMの活性化スパース性を向上させるために設計された新しいdReLU関数と、効果的なスパース化を促進するための高品質なトレーニングデータの混合比率を提案します。加えて、Mixture-of-Experts(MoE)モデルのFeed-Forward Network(FFN)エキスパート内のスパース活性化パターンを活用して、さらに効率を向上させます。我々のニューロンスパース化手法をMistralおよびMixtralモデルに適用した結果、推論イテレーションごとにそれぞれ25億および43億のパラメータのみが活性化され、より強力なモデル性能を達成しました。評価結果は、このスパース性が2~5倍のデコード速度向上を実現することを示しています。特に、モバイル電話では、我々のTurboSparse-Mixtral-47Bが1秒あたり11トークンの推論速度を達成しました。我々のモデルはhttps://huggingface.co/PowerInferで公開されています。
English
Exploiting activation sparsity is a promising approach to significantly
accelerating the inference process of large language models (LLMs) without
compromising performance. However, activation sparsity is determined by
activation functions, and commonly used ones like SwiGLU and GeGLU exhibit
limited sparsity. Simply replacing these functions with ReLU fails to achieve
sufficient sparsity. Moreover, inadequate training data can further increase
the risk of performance degradation. To address these challenges, we propose a
novel dReLU function, which is designed to improve LLM activation sparsity,
along with a high-quality training data mixture ratio to facilitate effective
sparsification. Additionally, we leverage sparse activation patterns within the
Feed-Forward Network (FFN) experts of Mixture-of-Experts (MoE) models to
further boost efficiency. By applying our neuron sparsification method to the
Mistral and Mixtral models, only 2.5 billion and 4.3 billion parameters are
activated per inference iteration, respectively, while achieving even more
powerful model performance. Evaluation results demonstrate that this sparsity
achieves a 2-5x decoding speedup. Remarkably, on mobile phones, our
TurboSparse-Mixtral-47B achieves an inference speed of 11 tokens per second.
Our models are available at https://huggingface.co/PowerInferSummary
AI-Generated Summary