arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.05339cs.DCcs.AIcs.LG
收藏

Elixir:在小型 GPU 集群上训练大语言模型

Elixir: Train a Large Language Model on a Small GPU Cluster

HPC-AI Technology Inc.(HPC-AI科技公司);National University of Singapore(新加坡国立大学)

Haichen Huang, Jiarui Fang, Hongxin Liu, Shenggui Li, Yang You

AI总结:

本文提出 Elixir 方案,通过运行前模型剖析自动选择内存划分与卸载的最优组合,在小型 GPU 集群上高效训练大语言模型,并在 GPT-2 上实现最高 3.4 倍加速。

摘要:

近年来,大语言模型因其前所未有的规模而取得了巨大成功。然而,训练这些模型对大多数研究者来说构成了挑战,因为这需要大量的 GPU。为了减少 GPU 内存使用,人们提出了内存划分和内存卸载方法。这些方法分别消除了内存冗余并将内存使用卸载到 CPU 和 NVMe 内存,从而使得在小型 GPU 集群上进行训练成为可能。然而,直接部署这些解决方案往往会导致效率不理想。只有经验丰富的专家才能通过仔细调整分布式配置来充分发挥硬件的全部潜力。因此,我们提出了一种新颖的解决方案 Elixir,它基于运行前模型剖析来自动化高效的大模型训练。Elixir 旨在识别内存划分和卸载技术的最优组合,以最大化训练吞吐量。在我们的实验中,Elixir 显著优于当前最先进的基线方法。与 SOTA 解决方案相比,我们的最优配置在 GPT-2 模型上实现了高达 3.4 倍的加速。我们希望我们的工作能够惠及缺乏计算资源和专业知识的个人,使他们能够使用大模型。Elixir 的测试版现已在 https://github.com/hpcaitech/ColossalAI/tree/feature/elixir 提供。

英文摘要:

In recent years, large language models have achieved great success due to their unprecedented size. However, training these models poses a challenge for most researchers as it requires a substantial number of GPUs. To reduce GPU memory usage, memory partitioning, and memory offloading have been proposed. These approaches eliminate memory redundancies and offload memory usage to the CPU and NVMe memory, respectively, enabling training on small GPU clusters. However, directly deploying these solutions often leads to suboptimal efficiency. Only experienced experts can unleash the full potential of hardware by carefully tuning the distributed configuration. Thus, we present a novel solution, Elixir, which automates efficient large-model training based on pre-runtime model profiling. Elixir aims to identify the optimal combination of partitioning and offloading techniques to maximize training throughput. In our experiments, Elixir significantly outperforms the current state-of-the-art baseline. Our optimal configuration achieves up to a 3.4$\times$ speedup on GPT-2 models compared with SOTA solutions. We hope that our work will benefit individuals who lack computing resources and expertise, granting them access to large models. The beta version of Elixir is now available at https://github.com/hpcaitech/ColossalAI/tree/feature/elixir.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑