Fast Inference of Mixture-of-Experts Language Models with Offloading

Artyom Eliseev, Denis Mazur
12/28/2023
141 citations
cs.LGcs.AIcs.DC
moe

Official code: dvmazur/mixtral-offloading (2,334 stars, Python, MIT, PyTorch, last commit 2024-04-08).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Run Mixtral-8x7B models in Colab or consumer desktops

2,334224Python, Jupyter NotebookDec 15, 20232 years agoMIT
colab-notebookdeep-learninggoogle-colablanguage-modelllm+4 more

Similar Papers

Cite this paper

@article{eliseev2023fast,
  title  = {Fast Inference of Mixture-of-Experts Language Models with Offloading},
  author = {Artyom Eliseev and Denis Mazur},
  year   = {2023},
  eprint = {2312.17238},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.17238v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.17238.svg)](https://codeofpaper.com/paper/2312.17238)

Discussion