個別訓練、統合結合:Mixture-of-Expertsを用いたモジュール化ポストトレーニング
Allen AIは、事前学習後のモジュール化された訓練手法「BAR」を開発し、個別のドメイン専門家モデルをMixture-of-Expertsアーキテクチャで統合することで、能力の劣化を防ぎつつ効率的なモデル拡張を実現した。
キーポイント
既存の訓練課題の解決
従来のポストトレーニングでは、新能力の追加時に既存スキルの消失(カタストロフィックフォゲッティング)や、再学習コストの高さが課題だったが、BARはこの問題を解決する。
BAR(Branch-Adapt-Route)の仕組み
単一のモデルを一括で訓練するのではなく、独立したドメインごとの専門家(エキスパート)を個別に完全なパイプラインで訓練し、MoEアーキテクチャで統合する手法を採用している。
FlexOlmoのポストトレーニングへの応用
以前の前学習向け技術「FlexOlmo」をポストトレーニング段階へ拡張し、共有層を凍結しつつFFNエキスパートのみを訓練・マージする柔軟性を提供している。
影響分析・編集コメントを表示
影響分析
この手法は、大規模言語モデルの継続的学習における「安定性」と「効率性」のトレードオフを解決する重要な一歩となる。特に、特定のドメイン知識を追加するたびにフルモデルの再学習を避けられるため、企業や研究機関におけるLLMのカスタマイズコストを大幅に削減できる。これはMoEアーキテクチャの実用化において、前学習だけでなくポストトレーニング段階でも有効なフレームワークを提供する画期的な進展である。
編集コメント
前学習段階でのMoE活用は一般的になりつつあるが、ポストトレーニングにおける「モジュール化された継続学習」の実装例は貴重である。既存モデルの能力を維持しつつ新スキルを追加する実務的なニーズに応える、極めて現実的なソリューションと言える。
2026年4月20日
Jacob Morrison, Sanjay Adhikesaven, Akshita Bhagia, Matei Zaharia, Noah A. Smith, Sewon Min - Ai2
事前学習(pretraining)終了後、言語モデルは実用的な有用性を獲得するために一連の中・後の学習段階を経て、指示のフォロー、問題解決のための推論、ツールの確実な呼び出しなどの能力を習得します。しかし、これらの段階を経てモデルを更新または拡張することはしばしば困難です。最も確実なオプションである、新しい能力を最初から組み込んでゼロから再学習(retraining from scratch)する方法は高コストであり、元の学習環境への完全なアクセスを必要とします。新しいデータでさらに学習させる方法はコストが低いですが、既存の能力を失う可能性があります。また、後の学習(post-training)は通常複数の段階からなり、それぞれが独自のデータと目的を持つため、新しいスキルを追加するには、以前の成果を損なうことなくそれらに対応するために各段階を再実行または調整する必要があります。
私たちは、これらの課題を回避するモジュラー型ポストトレーニングのためのレシピであるBAR(Branch-Adapt-Route)を紹介します。単一のモデルをすべてのデータに対して一度に訓練するのではなく、BARは独立したドメイン固有のエキスパート(各々が独自の完全なトレーニングパイプラインを通じて訓練される)を構築し、Mixture-of-Experts(MoE:エキスパートの混合)アーキテクチャを通じてそれらを統合モデルに構成します。各エキスパートは、他のエキスパートに触れることなく、開発、アップグレード、または置き換えが可能です。
私たちは、このアプローチを検証するために使用されたレシピ、技術レポート、およびチェックポイントを公開しています。
背景と動機
私たちの以前のFlexOlmoに関する研究は、モジュラー型MoEベースのトレーニングが事前学習(pretraining)において効果的であることを示しました。共有されたベースから分岐し、すべての共有レイヤーを凍結した状態でドメイン固有のフィードフォワードネットワーク(FFN:Feed-Forward Network)エキスパートを訓練し、それらを再度マージすることができます。しかし、私たちはこのレシピがポストトレーニングには適用されないことを発見しました。その理由は後から考えれば直感的です。事前学習は主にFFNレイヤーに存在する知識表現を更新しますが、ポストトレーニングでは、新しい出力形式、推論パターン、安全制約といった行動面の変化を導入する必要があり、これにはアテンションレイヤー、埋め込み(embeddings)、言語モデリングヘッドなどの共有パラメータへの変更が必要です。
例えば、検証済み報酬を用いた強化学習(RLVR)の段階でFlexOlmoのアプローチを直接試した際、報酬曲線は完全に平坦な状態となり、すべての共有パラメータを凍結したままではモデルが学習できませんでした。これが、ポストトレーニング専用の新しいレシピを開発する動機となりました。
BARの動作原理
BARには3つのステージがあります:
ステージ1:独立したエキスパートのトレーニング。 各ドメインのエキスパートは、2つのエキスパートを持つMoE(Mixture of Experts)として実装されます。1つは基盤モデルのFFN(Feed-Forward Network:前層ネットワーク)重みを保持する凍結された「アンカー」エキスパート、もう1つは学習可能なエキスパートです。各エキスパートは、そのドメインが必要とするトレーニングステージを通過します。私たちの実験では、数学とコードの分野はミッドトレーニング(Mid-training)、教師ありファインチューニング(SFT:Supervised Fine-Tuning)、そしてRLVRを経験します。一方、ツール使用と安全性の分野はSFTのみを行います。
この技術的な主要な貢献は、ステージ全体にわたる共有パラメータに対する段階的な凍結解除スケジュールです。
- 中間トレーニング:すべての共有レイヤーを凍結(事前トレーニングと同じ。知識の習得はFFNの更新のみで十分に捉えられるため)。
- SFT:埋め込み層と言語モデル化ヘッドを凍結解除。これは、新しい特殊トークン(例:ツール使用のための関数呼び出しフォーマット)を導入するドメインにおいて必要不可欠です。これを解除しないと、ツール呼び出し性能評価に使用したツール使用ベンチマークであるBerkeley Function Calling Leaderboard (BFCL)において、私たちのツール使用エキスパートは20.3というスコアに留まりました。凍結解除により、スコアは46.4まで向上しました。
- RLVR:注意機構を含むすべての共有パラメータを凍結解除。強化学習(RL)は、エキスパートのFFNが対応できる範囲を超えた分布シフトを引き起こします。各エキスパートは、ドメイン固有のデータと一般的なSFTデータの混合でもトレーニングされます。私たちはこれが重要であることを発見しました:ドメイン固有のSFTのみでは、ドメイン内でのパフォーマンスは高いものの、指示のフォローや知識といった一般的な能力が著しく低下します。
ステージ2:エキスパートのマージ。 トレーニング後、すべてのエキスパートを単一のMoEモデルにマージします。エキスパートの実行間で分岐した共有パラメータ(SFTやRLVR中に凍結解除されたため)は、単に平均化されます。私たちは、この平均化により、個々のエキスパートと比較してドメイン固有の評価において測定可能なパフォーマンスの損失はほとんどないか、全くないことを確認しました。
ステージ 3: ルーターのトレーニング。 最後に、MoE 内のルーターを、他のすべてのエキスパートと共有重みを凍結した状態でトレーニングします。SFT データの層別抽出 5% サンプルで十分なルーティング効果が得られることがわかっており、このステージは高速かつ低コストで実行できます。
評価全般での高いパフォーマンス
当社のモデルはすべて 7B スケール以上で、完全にポストトレーニングされた Olmo 2 ベースモデルの上に、数学、コード、ツール使用、安全性に関するエキスパートをトレーニングしています。(FlexOlmo アーキテクチャはこのモデルを中心に構築されており、新しいデータセットやポストトレーニングの改善が、元のリリース構成を超えてモデルをどのように強化できるかを探索するための有用なテストベッドを提供するため、Olmo 2 を使用しています。)19 のベンチマークにわたる 7 つの評価カテゴリをカバーする 6 つのベースラインと比較します。以下に報告されているすべてのスコアはカテゴリレベルの平均値です(100 点満点、高いほど良好)。ベンチマークごとの詳細な内訳については、技術レポートを参照してください。
いくつかの点が際立っています:
平均的に、BAR は中途からの再トレーニングを必要としないすべてのベースラインを上回ります。 BAR はポストトレーニングのみの再トレーニングよりも全体的に優れており(49.1 対 47.8)、特に数学(+7.8)とコード(+4.7)で大きな改善が見られます。これはモジュラートレーニングの構造的優位性によるものです。モノリシックなパイプラインでは、数学やコードに関する後期の RL が、早期の SFT ステージで学習された安全性の能力を低下させる可能性があります。モジュラートレーニングでは、各ドメインのパイプラインが独立しているため、この問題が完全に回避されます。
中間学習後の密モデルマージは壊滅的に失敗する。中間学習によりモデルの出力が十分に乖離し、単純な重み平均では機能しないほぼ動作しないモデル(ベンチマーク全体で6.5のスコア)が生成される。中間学習を行わない場合でも、マージ結果はBARを大幅に下回る(全体スコアで36.9対49.1)。
BTX(各エキスパートを完全に独立した密モデルとして訓練する手法)は、同じドメインごとのデータと学習段階を使用しているにもかかわらずBARに劣る(全体スコアで46.7対49.1)。共有パラメータなしでの訓練はより大きな乖離を生み、ルーティングによる組み合わせを困難にする。
中間学習付きの完全再訓練は依然として性能の上限(50.5)を示すが、元の事前学習チェックポイントへの完全なアクセスと、ゼロからの全データ再処理が必要であり、大半のオープンウェイトモデルにとって実用的ではなく、完全なアクセスが可能でも高コストである。
モジュール型アップグレード
BARのもっとも実用的な有用性の一つは、エキスパートを独立してアップグレードできる点である。私たちは2種類のアップグレードを示す:
- 新データへのアップグレード:高品質なデータと強化学習(RL)で訓練されたコード専門モデルに置き換えると、統合モデルにおけるコード性能は+16.5ポイント向上し、他のすべてのドメインはほぼ変化しません。
- 訓練ステージの追加:既存の数学専門モデルに、その監督教師あり学習(SFT)の上に強化学習(RL)を追加すると、統合モデルにおける数学性能は+13ポイント向上し、他のドメインへの影響は最小限に留まります。
どちらの場合も、影響を受けた専門モデルと軽量なルーティングネットワークのみを再訓練する必要があります。単一モデルのパイプラインでは、これらのアップグレードのいずれかを行うために、すべてのドメインにわたってフルモデルを再訓練する必要があります。これにより、BARはドメイン更新に対して線形の費用スケーリングを実現し、単一モデルの再訓練が事実上2次関数的なコスト(各ドメインの更新には全ドメインの再処理が必要)と比較して、大幅な効率化をもたらします。
私たちが学んだこと
いくつかの実践的な教訓:
- 後期学習(Post-training)には、事前学習(Pretraining)よりも高い柔軟性が求められます。すべての共有レイヤーを凍結する FlexOlmo のレシピは事前学習には有効ですが、後期学習の段階では機能しなくなります。段階的な凍結解除が不可欠であり、特に新しいトークンを持つドメインにおいては、強化学習(RL)中の注意機構の凍結解除や、埋め込み層/言語モデルヘッドの凍結解除が重要です。
- ドメイン固有の教師あり学習(SFT)だけでは不十分です。専門家が自身のドメインデータのみで訓練されると、そのドメイン内のパフォーマンスは向上しますが、汎用的な能力が損なわれます。一般的な SFT データと混合することが極めて重要です。
- 凍結解除後の重み平均化は、驚くほど良好な結果をもたらします。各専門家が SFT および RLVR(Reinforcement Learning from Verifiable Rewards)中に共有パラメータを独立して変更しているにもかかわらず、分岐したパラメータを単純に平均化しても、測定可能な劣化はほとんど、あるいは全く生じません。
- すべての専門家が常にアクティブである必要はありません。推論時に 5 つの専門家のうち 4 つを有効にするだけで、全 5 つを使用した場合とほぼ同等のパフォーマンスが達成され、より効率的なルーティング戦略の余地があることが示唆されています。
今後の展望
実際の大規模モデル開発はすでにモジュール化されており、異なるチームが異なる機能に取り組んでおり、新しいデータセットが異なるタイムラインで登場しており、単一のドメインの改善のためにパイプライン全体を再実行するコストは正当化しにくいものです。BAR は、この現実とトレーニングプロセスを整合させるレシピを提供します。
完全な再学習が依然として性能の上限を決定します。しかし、個々の能力について反復的に改善するチームにとって、BARはモデルの一部を独立してアップグレードし、劣化なく個別にトレーニングされたエキスパートを組み合わせ、単一の学習シーケンスですべてのドメインを実行することに伴う破滅的忘却を回避する方法を提供します。自然な次のステップは、密なモデルを引き上げる(アップサイクル)のではなく、元々疎なアーキテクチャから始めることであり、これによりモジュラーアプローチの効率性とスケーラビリティの両方が向上する可能性があります。
最新のAi2ニュースに関する月次アップデートを受け取るために登録してください。
原文を表示
April 20, 2026
Jacob Morrison, Sanjay Adhikesaven, Akshita Bhagia, Matei Zaharia, Noah A. Smith, and Sewon Min - Ai2
After pretraining, language models go through a series of mid- and post-training stages to become practically useful—learning to follow instructions, reason through problems, reliably call tools, and so on. But updating or extending a model following these stages is often challenging. The most reliable option, retraining from scratch with new capabilities included from the start, is expensive and requires full access to the original training setup. Training further on new data is cheaper, but it can cause the model to lose capabilities it already had. And because post-training typically involves multiple stages – each with its own data and objectives – adding new skills means rerunning or adjusting each stage to accommodate them without breaking what came before.
We present BAR (Branch-Adapt-Route), a recipe for modular post-training that sidesteps these issues. Rather than training a single model on all data at once, BAR trains independent domain experts – each through its own complete training pipeline – and composes them into a unified model via a mixture-of-experts (MoE) architecture. Each expert can be developed, upgraded, or replaced without touching the others.
We're releasing the recipe, a technical report, and the checkpoints used to validate the approach.
Background and motivation
Our earlier work on FlexOlmo showed that modular MoE-based training works well for pretraining: you can branch from a shared base, train domain-specific feed-forward network (FFN) experts while freezing all shared layers, and merge them back. But we found that this recipe doesn’t transfer to post-training. The reason is intuitive in hindsight—pretraining primarily updates knowledge representations, which live largely in FFN layers. Post-training, on the other hand, introduces behavioral shifts such as new output formats, reasoning patterns, and safety constraints that require changes to shared parameters like attention layers, embeddings, and the language modeling head.
For example, when we tried the FlexOlmo approach directly during reinforcement learning with verified rewards (RLVR), the reward curve was completely flat; the model simply could not learn with all shared parameters frozen. This motivated us to develop a new recipe specifically for post-training.
How BAR works
BAR has three stages:
Stage 1: Independent expert training. Each domain expert is instantiated as a two-expert MoE: one frozen "anchor" expert that preserves the base model's FFN weights, and one trainable expert. Experts go through whichever training stages their domain requires. In our experiments, math and code go through mid-training, supervised fine-tuning (SFT), and RLVR; tool use and safety use SFT only.
The key technical contribution is a progressive unfreezing schedule for shared parameters across stages:
- Mid-training: All shared layers frozen (same as pretraining, since knowledge acquisition is well-captured by FFN updates alone).
- SFT: Embedding layer and language modeling head unfrozen. This is necessary for domains that introduce new special tokens (e.g., function-calling formats for tool use). Without this, on the Berkeley Function Calling Leaderboard (BFCL) – the tool use benchmark we used for tool-calling performance evaluation – our tool use expert scored 20.3. With unfreezing, it reached 46.4.
- RLVR: All shared parameters unfrozen, including attention. RL induces distributional shifts that extend beyond what expert FFNs can accommodate.
Each expert also trains on a mixture of domain-specific and general SFT data. We found this is critical: domain-only SFT produces strong in-domain performance but severely degrades general capabilities like instruction following and knowledge.
Stage 2: Expert merging. After training, we merge all experts into a single MoE model. Shared parameters that diverged across expert runs (because they were unfrozen during SFT or RLVR) are simply averaged. We find this averaging introduces little to no measurable performance loss on domain-specific evaluations compared to any individual expert.
Stage 3: Router training. Finally, we train the router inside of the MoE with all other experts and shared weights frozen. We found that a stratified 5% sample of the SFT data is sufficient for effective routing, making this stage fast and cheap.
Strong performance across evals
Our models are all at least at the 7B scale, training experts for math, code, tool use, and safety on top of a fully post-trained Olmo 2 base model. (We use Olmo 2 because our FlexOlmo architecture was built around it, and because it provides a useful testbed for exploring how newer datasets and post-training improvements can strengthen a model beyond its original release configuration.) We compare against six baselines across 19 benchmarks, spanning 7 evaluation categories. All scores reported below are category-level averages (out of 100, the higher the better). For per-benchmark breakdowns, please refer to our technical report.
A few things stand out:
On average, BAR outperforms all baselines that don't require rerunning mid-training from scratch. BAR beats retraining with post-training only overall (49.1 vs. 47.8), with particularly large gains in math (+7.8) and code (+4.7). We attribute this to a structural advantage of modular training: in a monolithic pipeline, late-stage RL on math and code can degrade safety capabilities learned during earlier SFT stages. Modular training avoids this entirely because each domain's pipeline is isolated.
Dense model merging after mid-training fails catastrophically. Mid-training causes models to diverge enough that naive weight averaging produces a nearly non-functional model—one that scores 6.5 overall on our benchmarks. Even without mid-training, merging trails BAR by a wide margin (36.9 vs 49.1 overall).
BTX, a technique that trains each expert as a fully independent dense model, underperforms BAR (46.7 vs. 49.1 overall) despite using the same per-domain data and training stages. Training without shared parameters leads to greater divergence, making composition via routing more difficult.
Full retraining with mid-training remains the performance ceiling (50.5), but requires full access to the original pretraining checkpoint and reprocessing everything from scratch— impractical for most open-weight models, and expensive even with full access.
Modular upgrades
One of the most tangibly useful properties of BAR is that experts can be upgraded independently. We demonstrate two types of upgrades:
- Upgrading to newer data: Replacing a code expert with one trained on higher-quality data and RL improves code performance by +16.5 points in the combined model, while all other domains remain essentially unchanged.
- Adding a training stage: Taking an existing math expert and adding RL on top of its SFT improves math by +13 points in the combined model, again with minimal impact on other domains.
In both cases, only the affected expert and the lightweight router need retraining. In a monolithic pipeline, either of these upgrades would require retraining the full model across all domains. This gives BAR linear cost scaling for domain updates, compared to the effectively quadratic cost of monolithic retraining (each domain update requires reprocessing all domains).
What we learned
A few practical takeaways:
- Post-training needs more flexibility than pretraining. The FlexOlmo recipe of freezing all shared layers works for pretraining but breaks during post-training. Progressive unfreezing is essential, especially unfreezing attention during RL and embeddings/LM head for domains with new tokens.
- Domain-only SFT isn’t enough. Training an expert on only its own domain data improves in-domain performance but destroys general capabilities. Mixing with general SFT data is critical.
- Weight averaging after unfreezing works surprisingly well. Despite each expert independently modifying shared parameters during SFT and RLVR, simply averaging the diverged parameters introduces little to no measurable degradation.
- Not every expert needs to be active. Activating 4 of 5 experts at inference time achieves nearly identical performance to using all 5, suggesting room for more efficient routing strategies.
Looking ahead
In practice, large-scale model development is already modular: different teams work on different capabilities, new datasets appear on different timelines, and the cost of rerunning an entire pipeline for a single domain improvement is hard to justify. BAR offers a recipe that aligns the training process with this reality.
Full retraining still sets the performance ceiling. But for teams iterating on individual capabilities, BAR provides a way to upgrade parts of a model independently, compose independently trained experts without degradation, and avoid the catastrophic forgetting that comes from running all domains through a single training sequence. One natural next step is starting from a natively sparse architecture rather than upcycling a dense model, which could improve both the efficiency and scalability of the modular approach.
Subscribe to receive monthly updates about the latest Ai2 news.
関連記事
Cohere が開発者向けコード生成モデル「North Mini Code」を発表:30B パラメータの MoE アーキテクチャで 3B アクティブ
Cohere AI チームは、ソフトウェアエンジニア向けのオープンウェイトコード生成モデル「North Mini Code」を公開した。このモデルは総パラメータ数 30B の混合専門家(MoE)アーキテクチャを採用し、トークン処理時に 3B のパラメータのみが活性化するように設計されている。
Visa と ChatGPT の統合により AI エージェントが小売購入を可能に
Visa が決済インフラを ChatGPT に連携させ、AI エージェントが商品推薦から決済実行まで人間を介さず自動処理する機能を導入した。
Anthropic のダリオ・アモダイ氏に直属の部下はたった一人だけ
AI 企業 Anthropic の CEO ダリオ・アモダイ氏が、組織運営において直属の部下を一人しか置かないという独自の管理方針を採用していることが明らかになった。
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み