With the widespread adoption of Large Language Models (LLMs), many deep learning practitioners are looking for strategies of running these models more efficiently. One such strategy is to use sparse Mixture-of-Experts (MoE) - a type of model architectures where only a fraction of model layers are active for any given input. This property allows MoE-based language models to generate tokens faster than their dense counterparts, but it also increases model size due to having multiple experts. Unfortunately, this makes state-of-the-art MoE language models difficult to run without high-end GPUs. In this work, we study the problem of running large MoE language models on consumer hardware with limited accelerator memory. We build upon parameter offloading algorithms and propose a novel strategy that accelerates offloading by taking advantage of innate properties of MoE LLMs. Using this strategy, we build can run Mixtral-8x7B with mixed quantization on desktop hardware and free-tier Google Colab instances.
翻译:随着大语言模型的广泛应用,许多深度学习从业者正在探索更高效运行这些模型的策略。其中一种策略是采用稀疏混合专家架构——这种模型架构中,对于任意输入仅激活部分模型层。该特性使得基于混合专家架构的语言模型比同等规模密集模型能更快生成标记,但同时也因包含多个专家而导致模型规模增大。这导致最先进的混合专家语言模型难以在没有高端GPU的条件下运行。本研究聚焦于在算力受限的消费级硬件上运行大规模混合专家语言模型的问题。我们基于参数卸载算法进行改进,提出了一种利用混合专家大语言模型固有特性来加速参数卸载的新策略。采用该策略,我们成功在桌面级硬件和免费版Google Colab实例上实现了采用混合量化的Mixtral-8x7B模型部署。