arXiv:2605.31268cs.CL2026-05

12B参数的开源编程模型,每轮只激活25亿参数,性能媲美更大模型。

Mellum2 Technical Report

论文配图:Mellum2 Technical Report
图 1 · 摘自论文原文
  • 采用专家混合架构,每令牌仅激活8个专家,大幅降低计算量。
  • 在代码生成、推理和工具调用等任务中表现接近40亿-140亿参数模型。
  • 适合开发者、研究人员使用,尤其关注高效能编程辅助与可解释性推理。

我们介绍Mellum 2,一个拥有120亿参数的开源专家混合(MoE)语言模型,每令牌仅激活25亿参数。该模型专注于软件工程,涵盖代码生成、编辑、调试、多步推理、工具使用、函数调用、智能体编程及对话式编程支持,是此前专注补全的40亿参数稠密模型的升级版。其架构基于64个专家、8个活跃专家的专家混合结构,结合分组查询注意力(4个键值头)、滑动窗口注意力(每四层中三层启用),以及单个多标记预测头,兼具预训练辅助目标与推测解码的草稿模型功能;所有设计均以消费级显卡上的推理效率为约束进行消融验证。预训练覆盖约10.6万亿令牌,采用三阶段课程学习,逐步从多样化网页数据转向精选代码与数学内容,使用Muon优化,在FP8混合精度下采用暖启动-保持-线性衰减至零的学习率策略。基础模型通过分层选择性YaRN扩展至128K上下文窗口,并经过两阶段微调(监督微调后接RLVR),生成两个版本:直接回答的Instruct模型与输出显式推理轨迹的Thinking模型。在代码生成、数学与推理、工具使用、知识和安全基准测试中,Mellum 2在40亿至140亿参数的开源基线中表现相当,且每令牌计算量相当于25亿参数稠密模型。我们以Apache 2.0许可证发布基础、Instruct和Thinking三个检查点,以及本技术报告中的架构决策、数据流水线与训练方案。

原文摘要 · Abstract (English)

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.

大模型代码生成专家混合高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。