[论文解读] JetMoE: Reaching Llama2 Performance with 0.1M Dollars
JetMoE-8B 是一个稀疏专家混合(MoE)语言模型,使用不到 10 万美元的预算,基于 1.25T 个标记的开源数据集和 30,000 个 H100 GPU 小时进行训练。通过在注意力和前馈专家中均应用稀疏激活,其总参数量为 80 亿,但每个标记仅激活 20 亿参数,使推理成本降低约 70%,并在关键基准测试中超越 Llama2-7B 和 Llama2-13B-Chat,同时保持完全开源和可复现性。
Large Language Models (LLMs) have achieved remarkable results, but their increasing resource demand has become a major obstacle to the development of powerful and accessible super-human intelligence. This report introduces JetMoE-8B, a new LLM trained with less than $0.1 million, using 1.25T tokens from carefully mixed open-source corpora and 30,000 H100 GPU hours. Despite its low cost, the JetMoE-8B demonstrates impressive performance, with JetMoE-8B outperforming the Llama2-7B model and JetMoE-8B-Chat surpassing the Llama2-13B-Chat model. These results suggest that LLM training can be much more cost-effective than generally thought. JetMoE-8B is based on an efficient Sparsely-gated Mixture-of-Experts (SMoE) architecture, composed of attention and feedforward experts. Both layers are sparsely activated, allowing JetMoE-8B to have 8B parameters while only activating 2B for each input token, reducing inference computation by about 70% compared to Llama2-7B. Moreover, JetMoE-8B is highly open and academia-friendly, using only public datasets and training code. All training parameters and data mixtures have been detailed in this report to facilitate future efforts in the development of open foundation models. This transparency aims to encourage collaboration and further advancements in the field of accessible and efficient LLMs. The model weights are publicly available at https://github.com/myshell-ai/JetMoE.
研究动机与目标
- 开发一种高性能、低成本的大规模语言模型,仅使用最少的财务和计算资源。
- 通过仅使用公开数据集和开源代码,实现 MoE 模型的开放、可复现训练。
- 通过在 Transformer 架构的注意力和前馈组件中应用稀疏激活,降低推理成本。
- 证明在有限预算下,可实现开源 LLM 的最先进性能。
- 为未来研究和模型开发提供透明、适合学术界的训练方案。
提出的方法
- JetMoE-8B 在自注意力和前馈层中均采用稀疏专家混合(SMoE)架构,实现每个标记仅选择性激活部分专家。
- 路由器网络通过线性层后接 top-k Softmax 实现,为每个输入标记选择最相关的专家。
- 注意力专家和前馈专家均实现稀疏激活,与密集的 Llama2-7B 相比,推理计算量降低约 70%。
- 所有注意力专家共享键值(KV)投影,以提升训练稳定性。
- 采用两阶段训练策略,结合来自多样化开源数据集的 1.25T 标记的精心筛选混合数据,确保高质量预训练。
- 所有训练超参数、数据混合比例和模型权重均公开发布,以确保可复现性并促进未来研究。
实验结果
研究问题
- RQ1稀疏 MoE 模型是否能在显著降低训练成本的前提下,实现与 Llama2 等密集 LLM 相当的性能?
- RQ2在注意力和前馈层均应用稀疏激活,是否比仅在前馈层应用能带来更大的效率提升?
- RQ3能否在 10 万美元以下预算和仅使用公开数据集的前提下,训练出高性能的开源 LLM,以实现广泛的学术可及性?
- RQ420 亿活跃参数的 MoE 模型在多样化的基准测试中,与 Llama2-13B-Chat 等更大参数的密集模型相比表现如何?
- RQ5透明、开放的训练方案在多大程度上能促进开源基础模型的可复现性和社区发展?
主要发现
- JetMoE-8B 在 OpenLLM 基准测试的所有任务中均优于 Llama2-7B,平均得分为 51.0,而 Llama2-7B 为 46.4。
- JetMoE-8B-Chat 在 OpenLLM 基准测试中超越 Llama2-13B-Chat,平均得分为 53.0,而 Llama2-13B-Chat 为 47.6。
- 在 MBPP 基准测试中,JetMoE-8B 的 Pass@1 得分为 34.2,优于 Gemma、LLaMA2 和 DeepseekMoE。
- 在 HumanEval 基准测试中,JetMoE-8B 的 Pass@1 得分为 25.0,优于 LLaMA2-7B(12.8)和 Gemma(20.8)。
- JetMoE-8B-Chat 在 MT-Bench 上得分为 6.681,略高于 Llama-2-13b-chat(6.650),表明其具备出色的指令遵循能力。
- 尽管其活跃参数量较小(20 亿),JetMoE-8B 由于稀疏专家路由机制,相比 Llama2-7B 推理计算量仍降低约 70%。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。