Skip to main content
QUICK REVIEW

[论文解读] Hunyuan-Large: An Open-Source MoE Model with 52 Billion Activated Parameters by Tencent

Xingwu Sun, Yanfeng Chen|arXiv (Cornell University)|Nov 4, 2024
Age of Information OptimizationComputer Science被引用 5
一句话总结

Hunyuan-Large 是同等规模的开源 Transformer 基于专家混合模型中参数激活量最大的模型,具有 52B 激活参数(总计 389B)和 256K 的上下文,达到同等规模开源模型的最前沿性能,并且在远大参数的密集模型上也具备竞争力。

ABSTRACT

In this paper, we introduce Hunyuan-Large, which is currently the largest open-source Transformer-based mixture of experts model, with a total of 389 billion parameters and 52 billion activation parameters, capable of handling up to 256K tokens. We conduct a thorough evaluation of Hunyuan-Large's superior performance across various benchmarks including language understanding and generation, logical reasoning, mathematical problem-solving, coding, long-context, and aggregated tasks, where it outperforms LLama3.1-70B and exhibits comparable performance when compared to the significantly larger LLama3.1-405B model. Key practice of Hunyuan-Large include large-scale synthetic data that is orders larger than in previous literature, a mixed expert routing strategy, a key-value cache compression technique, and an expert-specific learning rate strategy. Additionally, we also investigate the scaling laws and learning rate schedule of mixture of experts models, providing valuable insights and guidances for future model development and optimization. The code and checkpoints of Hunyuan-Large are released to facilitate future innovations and applications. Codes: https://github.com/Tencent/Hunyuan-Large Models: https://huggingface.co/tencent/Tencent-Hunyuan-Large

研究动机与目标

  • 推动并使得大规模开源 MoE 建模成为可能,达到超大激活参数量的目标。
  • 证明 Hunyuan-Large 在 NLP 任务、编码、数学和长上下文基准上具备卓越性能。
  • 展示数据合成、模型架构创新和训练方案,提升 MoE 的扩展效率与训练稳定性。
  • 为 MoE 的扩展规律和学习率策略提供洞见,以指引未来的 MoE 发展。

提出的方法

  • 提出一个基于 Transformer 的 Mixture-of-Experts (MoE) 模型,具备 1 个共享专家和每个令牌激活 16 个专用专家。
  • 引入 KV cache 压缩,结合 Grouped-Query Attention (GQA) 和 Cross-Layer Attention (CLA),显著降低 KV cache 内存需求(约 ~95%)。
  • 采用混合路由策略和回收路由机制,在训练中平衡负载并从过载的专家中恢复。
  • 应用专家特定的学习率缩放,使共享与专用专家的有效小批量大小保持一致,以提升训练效率。
  • 在 7 万亿令牌级别的高质量合成数据(包含指令合成与自洽性筛选)以及长上下文前训练(高达 256K 令牌)上进行预训练。
  • 通过 SFT 和 RLHF(通过 DPO)进行后训练,以提升任务特定能力并与人类偏好对齐。

实验结果

研究问题

  • RQ1在保持训练效率和稳定性的同时,将 MoE 模型扩展到非常大量的激活参数的有效技术是什么?
  • RQ2数据合成、KV cache 压缩和专家路由策略如何影响 MoE 模型在多语言和长上下文任务上的性能?
  • RQ3专家特定学习率调度是否能改善混合共享/专用 MoE 架构的训练动态和最终性能?
  • RQ4MoE 模型在激活参数、数据和计算方面的扩展规律是什么,如何为未来 MoE 设计提供指导?

主要发现

  • Hunyuan-Large 在相似激活参数规模的开源模型中,在多项英文和中文基准测试上实现了最佳综合性能。
  • 在如 MMLU 的聚合基准上,它以更少的激活参数(52B 对比 405B)超越了 LLama3.1-405B。
  • 在数学(GSM8K、MATH、CMATH(中文))和编码(HumanEval、MBPP)领域达到顶尖结果。
  • 由于进行长上下文预训练,展示了高达 256K 上下文的能力,训练规模达到 7T 令牌级的预训练数据和 7T 数据规模。
  • 高质量合成数据、KV cache 压缩(GQA+CLA)以及专家特定学习率缩放的组合,是实现性能提升的关键因素。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。