Mellum2 技术报告
Mellum2 Technical Report
AI总结:
本文介绍 Mellum 2,一个12B参数(每token激活2.5B)的混合专家语言模型,专攻软件工程,通过架构创新和训练优化在代码生成、数学推理等基准上达到4B-14B开源模型的竞争力。
摘要:
我们提出 Mellum 2,一个开放权重的12B参数混合专家(MoE)语言模型,每token激活2.5B参数。Mellum 2是一个通用语言模型,专精于软件工程,涵盖代码生成与编辑、调试、多步推理、工具使用与函数调用、智能体编码以及对话式编程辅助,它是之前专注于补全的4B密集模型Mellum的继任者。架构基于混合专家(64个专家,8个激活),结合了分组查询注意力(4个KV头)、每四层中三层使用滑动窗口注意力,以及一个多token预测头,该头同时作为辅助预训练目标和内置的推测解码草稿模型;每个选择都通过消融实验验证,并以商品GPU上的推理效率作为设计约束。预训练涵盖约10.6万亿token,通过三个阶段的学习课程,从多样化的网络数据逐步转向精选的代码和数学内容,使用Muon优化器在FP8混合精度下进行优化,并采用预热-保持-衰减调度(线性衰减至零)。预训练基础模型通过层选择性YaRN扩展到128K上下文窗口,然后分两个阶段进行后训练(监督微调后接RLVR),产生两个发布变体:直接回答的Instruct模型和在最终答案前输出显式推理轨迹的Thinking模型。在代码生成、数学与推理、工具使用、知识和安全基准上,Mellum 2与4B-14B范围内的开放权重基线模型竞争,同时每token计算量相当于2.5B密集模型。我们在Apache 2.0许可下发布基础、指令和思考检查点,以及关于架构决策、数据管道和训练配方的本报告。
英文摘要:
We present Mellum 2, an open-weight 12B-parameter Mixture-of-Experts (MoE) language model with 2.5B active parameters per token. Mellum 2 is a general-purpose language model specialized in software engineering, spanning code generation and editing, debugging, multi-step reasoning, tool use and function calling, agentic coding, and conversational programming assistance, and it is the successor to the completion-focused 4B dense Mellum model. The architecture builds on the Mixture-of-Experts (64 experts, 8 active) and combines Grouped-Query Attention with 4 KV heads, Sliding Window Attention on three of every four layers, and a single Multi-Token Prediction head that doubles as both an auxiliary pre-training objective and a built-in draft model for speculative decoding; each choice was validated by ablation with inference efficiency on commodity GPUs as a design constraint. Pre-training spans approximately 10.6 trillion tokens through a three-phase curriculum that progressively shifts the mixture from diverse web data toward curated code and mathematical content, optimized with Muon under FP8 hybrid precision and a Warmup-Hold-Decay schedule with linear decay to zero. The pre-trained base is extended to a 128K context window via a layer-selective YaRN and then post-trained in two stages (supervised fine-tuning followed by RLVR), yielding two released variants: an Instruct model that answers directly and a Thinking model that emits an explicit reasoning trace before its final answer. Across code generation, math and reasoning, tool use, knowledge, and safety benchmarks, Mellum 2 is competitive with open-weight baselines in the 4B-14B range while running at the per-token compute of a 2.5B dense model. We release the base, instruct, and thinking checkpoints, together with this report on the architecture decisions, data pipeline, and training recipe behind them, under the Apache 2.0 license.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。