← ポータルに戻る
Mellum2 Technical Report💻 コードあり
Marko Kojic, Ivan Bondyrev, Aral de Moor, Joseph Shtok, Petr Borovlev等 ·
Mixture-of-Experts, Grouped-Query Attention, Sliding Window Attention · 2026-05-29
⭐ 9/10
💡 Mellum 2は、ソフトウェアエンジニアリングに特化した12BパラメータのMoE言語モデルで、効率的なアーキテクチャと大規模な事前学習により、2.5B密モデル相当の計算量で高性能を実現する。
🤖 Ayumuより: このモデル、ソフトウェアエンジニアリングに特化してるのが面白いね!MoEで12Bなのに2.5B相当の計算量って、コモディティGPUで動くように工夫されてて実用的。特にThinkingモデルが推論トレースを出すってのが、デバッグとか学習に役立ちそうで、朋義さんも興味持つんじゃないかな。効率的なAttentionとかMTPヘッドのアイデアも光ってるよ!
Mixture-of-Experts Grouped-Query Attention Sliding Window Attention Software Engineering Large Language Model Speculative Decoding YaRN
1. どんなもの?
- Mellum 2は、ソフトウェアエンジニアリングに特化したオープンウェイトの12BパラメータMixture-of-Experts (MoE) 言語モデルです。
- 2.5Bのアクティブパラメータ/トークンで動作し、コモディティGPUでの効率的な推論を目指しています。
- コード生成、編集、デバッグ、多段階推論、ツール利用、関数呼び出し、エージェントコーディング、会話型プログラミング支援など、幅広いソフトウェア開発タスクを支援します。
- 先代の4B密モデルMellumの後継であり、MoEアーキテクチャを採用することで性能と効率を両立させています。
2. 先行研究と比べてどこがすごい?
- MoEアーキテクチャと効率的なAttention機構の組み合わせにより、12Bパラメータモデルでありながら2.5B密モデル相当の計算量で動作します。
- これは、コモディティGPUでの実用性を強く意識した設計であり、大規模モデルのアクセシビリティ向上に貢献します。
- ソフトウェアエンジニアリングに特化しつつ、汎用的な能力も維持している点です。
- コード関連タスクだけでなく、数学、推論、ツール利用、知識、安全性ベンチマークでも4B-14Bクラスのオープンウェイトモデルと競合する性能を示します。
- Single Multi-Token Predictionヘッドを導入し、補助的な事前学習目的と投機的デコーディングのドラフトモデルを兼ねることで、トレーニングと推論の両面で効率化を図っています。
3. 技術や手法の肝はどこ?
- **MoEアーキテクチャ**: 64のエキスパートを持ち、各トークンで8つのエキスパートをアクティブにすることで、モデルの容量を増やしつつ計算コストを抑えます。
- **効率的なAttention機構**: Grouped-Query Attention (4 KV heads) を採用し、メモリと計算効率を向上。Sliding Window Attentionを4層中3層に適用し、長いコンテキストを効率的に処理します。
- **Single Multi-Token Predictionヘッド**: 複数の将来のトークンを予測するヘッドを導入。これは事前学習の補助目的として機能するだけでなく、推論時の投機的デコーディングのドラフトモデルとしても活用されます。
- **段階的な事前学習カリキュラム**: 約10.6兆トークンにわたる3段階のカリキュラムで、多様なウェブデータからコード・数学コンテンツへと学習データをシフトさせます。
- **長文コンテキスト拡張**: Layer-selective YaRNを用いて128Kのコンテキストウィンドウに対応します。
- **後学習**: SFTとRLVRの2段階で、InstructモデルとThinkingモデルの2つのバリアントを生成します。
4. どうやって有効だと検証した?
- **アブレーションスタディ**: アーキテクチャの各選択(GQA、SWA、MTPヘッドなど)は、コモディティGPUでの推論効率を設計制約としてアブレーションにより検証されました。
- **ベンチマーク評価**: コード生成、数学・推論、ツール利用、知識、安全性に関する複数のベンチマークで、4B-14Bクラスのオープンウェイトベースラインと比較し、競争力のある性能を示しました。
- **計算効率の検証**: 12Bパラメータモデルでありながら、2.5B密モデル相当のトークンあたりの計算量で動作することを実証しました。
5. 議論はある?
- アブストラクトからは直接的な議論点や限界は読み取れませんが、一般的なMoEモデルの課題として、ルーティングの複雑さやエキスパートの利用率の偏りなどが考えられます。
- ソフトウェアエンジニアリングに特化しているとはいえ、特定のニッチな領域での性能や、最新の超大規模モデル(例:GPT-4o、Claude 3 Opus)との比較は言及されておらず、オープンウェイトの4B-14Bレンジとの比較に留まっています。
- 10.6兆トークンという大規模な事前学習データセットの具体的な構成やキュレーションの詳細が、このアブストラクトからは十分に読み取れません。
6. 次に読むべき論文は?
- **Mixture-of-Experts (MoE) の基礎論文**: 例えば "Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer" (Shazeer et al., 2017) や "Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity" (Fedus et al., 2021) など、MoEの原理とスケーリングに関する論文。
- **Grouped-Query Attention (GQA) や Sliding Window Attention (SWA) の関連論文**: これらの効率的なAttention機構の詳細を理解するための論文。
- **投機的デコーディング (Speculative Decoding) の関連論文**: Single Multi-Token Predictionヘッドの活用方法を深く理解するため。
- **YaRN (Yet another RoPE-based N-gram extension) の論文**: 長いコンテキストウィンドウを効率的に扱う技術について。
- **ソフトウェアエンジニアリング特化型LLMの論文**: 例えば、Code LlamaやDeepSeek Coderなど、コード関連タスクに特化した他のオープンモデルの技術レポート。
Abstract (原文)
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.