注目すべき2024年のAI研究論文(第1部)
AI研究者のSebastian Raschkaは、2024年上半期(1月から6月)に発表された注目すべきLLM研究論文を月ごとに1本ずつ選び、特に1月のMixtral 8x7Bに関するMixture of Experts論文を詳細に紹介している。
キーポイント
記事の目的と構成
著者は2024年の膨大なAI研究の中から、特にLLM研究に焦点を当て、月ごとに1本の注目論文を選んで紹介するシリーズの第1部(1月から6月分)を執筆した。
1月の注目論文:Mixtral 8x7B
2024年1月上旬にMistral AIチームが発表したMixture of Experts (MoE)モデル「Mixtral 8x7B」の論文は、オープンウェイトのMoE LLMとして初めてのものの一つであり、Llama 2 70BやGPT-3.5を様々なベンチマークで上回る性能を示した。
Mixture of Experts (MoE)の仕組み
MoEは、複数の小さな「エキスパート」サブネットワークを組み合わせたアンサンブルモデルであり、トランスフォーマーアーキテクチャ内のフィードフォワードモジュールを複数のエキスパート層で置き換えることで、計算リソースをより効率的に割り当てることを目指している。
Sparse Mixture of Experts (MoE) の仕組み
MoEでは、各トークン処理時に8つのエキスパート層のうち1〜2つだけが活性化され、計算コストを削減しながらモデル容量を維持する。
MoEモデルの現状と重要性
オープンウェイトモデルでは従来の密なLLMが主流だが、MoEは計算効率の良いスケーリングを可能にし、DeepSeek-V3などで採用され続けている。
DoRAの基本的な仕組み
DoRAは事前学習済みの重み行列を大きさベクトルmと方向行列Vに分解し、方向行列VにのみLoRAスタイルの低ランク更新を適用する。
DoRAの利点
LoRAよりも柔軟性が高く、大きさを増やすことなく微妙な方向調整が可能で、パラメータ数が少なくても性能が向上し、ランクの選択に対する感度も低い。
影響分析・編集コメントを表示
影響分析
この記事は、2024年のAI研究動向をまとめた貴重な資料の一部であり、特にLLM分野の重要な進展を時系列で把握できる。Mixtral 8x7Bの紹介は、オープンソースLLMとMoEアーキテクチャの進化を示す具体例として、業界関係者にとって参考になる。
編集コメント
著者の個人的な選定基準に基づく紹介記事であり、網羅性よりも「注目度」と「多様性」を重視している点に留意。今後のパート2への期待が高まる内容構成だ。
今年を締めくくるにあたり、ついに2024年のAI研究ハイライト記事の草案を完成させることができました。この記事では、エキスパート混合モデルから精度のための新しい大規模言語モデル(LLM)のスケーリング法則に至るまで、多岐にわたるトピックを取り上げています。
2024年の主要な研究ハイライトすべてを振り返るには、おそらく一冊の本を書く必要があるでしょう。このような急速に変化する分野においてさえ、極めて生産的な一年でした。内容を適度に簡潔に保つため、私は今年に限ってLLMの研究に焦点を絞ることにしました。しかしそれでも、このように激動の一年からどの論文のサブセットを選ぶべきかという問いは残ります。私が考えついた最もシンプルなアプローチは、2024年1月から12月まで、毎月1本ずつ論文を紹介することです。
したがって、この記事では私自身が個人的に魅力的で、影響力があり、できればその両方であると感じた研究論文をご紹介いたします。ただし、この記事はシリーズの第1部であり、2024年の前半(1月から6月)に焦点を当てています。7月から12月をカバーするシリーズの第2部は、来年1月下旬に公開される予定です。
選定基準は確かに主観的なものであり、今年私にとって際立っていたものに基づいています。また、LLMモデルのリリースに関する内容だけにならないよう、ある程度の多様性も目指しました。
より広範なAI研究論文リストをお探しの場合は、以前の記事(LLM Research Papers: The 2024 List)をご覧ください。
前回の記事を読んでくださった皆様、私の体調も少し良くなり、ゆっくりと確実に回復していることをお伝えできて嬉しく思います。また、温かいお言葉やご支援をいただき、心から感謝申し上げます。そのおかげで、本当に大きな励みとなり、困難な日々を乗り越えることができました!
新年おめでとうございます、そして楽しい読書をお過ごしください!
- 1 月:Mixtral のエキスパート混合アプローチ
2024 年 1 月の初め、わずか数日後の 1 月 8 日、Mistral AI チームは Mixtral of Experts(エキスパート混合)論文を発表しました。この論文では、Sparse Mixture of Experts (SMoE) モデルである Mixtral 8x7B が紹介されています。
当時、この論文とモデルは非常に影響力がありました。Mixtral 8x7B は、印象的なパフォーマンスを誇る最初のオープンウェイト MoE LLM(大規模言語モデル)の一つだったからです。さまざまなベンチマークにおいて、Llama 2 70B や GPT-3.5 を上回る性能を示しました。
1.1 MoE モデルの理解
MoE、すなわち Mixture of Experts(エキスパート混合)は、GPT 型デコーダーアーキテクチャ内に複数の小さな「エキスパート」サブネットワークを統合したアンサンブルモデルです。各サブネットワークは、異なる種類のタスク、あるいはより具体的にはトークンの処理を担当するとされています。ここで目指しているのは、1 つの巨大なネットワークではなく複数の小さなサブネットワークを使用することで、計算リソースをより効率的に割り当てることです。
特に Mixtral 8x7B では、トランスフォーマーアーキテクチャ内の各フィードフォワードモジュールを、以下の図に示すように 8 層のエキスパートレイヤーで置き換えています。

Attention Is All You Need の注釈付きトランスフォーマーアーキテクチャ、https://arxiv.org/abs/1706.03762
「スパース・エキスパート・オブ・エキスパート(Sparse Mixture of Experts)」の文脈における「スパース」とは、任意の時点で処理に使用されるエキスパート層の一部のみがアクティブになる事実を指します(通常、Mixtral 8x7B の 8 つのうち 1 または 2 つ)。
上記の図に示されているように、サブネットワークは LLM(大規模言語モデル)内のフィードフォワードモジュールを置き換えます。フィードフォワードモジュールは本質的に多層パーセプトロンです。PyTorch に似た擬似コードでは、以下のように記述されます。
class FeedForward(torch.nn.Module):
def __init__(self, embed_dim, coef):
super().__init__()
self.layers = nn.Sequential(
torch.nn.Linear(embed_dim, coef*embed_dim),
torch.nn.ReLU(),
torch.nn.Linear(coef*n_embed, embed_dim),
torch.nn.Dropout(dropout)
)
def forward(self, x):
return self.layers(x) さらに、各トークン埋め込みを 8 つのエキスパート用フィードフォワードモジュールへリダイレクトするルーターモジュール(ゲートネットワークとも呼ばれる)も存在し、そのうちの一部のみが同時にアクティブになります。
本記事ではさらに11本の論文を取り上げる予定なので、Mixtral モデルに関する説明は簡潔に留めます。ただし、詳細については私の以前の論文「Model Merging, Mixtures of Experts, and Towards Smaller LLMs」をご覧ください。
1.2 現在の MoE モデルの重要性
年初であれば、オープンウェイトの MoE モデルが今日よりもより人気で広く利用されていると考えていたかもしれません。それらが無関係であるわけではありませんが、多くの最先端モデルは依然として MoE ではなく、密な(従来の)LLM に依存しています。例えば、Llama 3、Qwen 2.5、Gemma 2 などです。ただし、GPT-4、Gemini、Claude といった独自アーキテクチャが何に基づいているかを言うことはもちろん不可能であり、裏側では MoE を使用している可能性もあります。
いずれにせよ、MoE アーキテクチャは依然として重要です。特に、各入力に対してモデルパラメータの一部のみを活性化することで大規模言語モデルを効率的にスケールできる方法を提供し、モデルの容量を犠牲にすることなく計算コストを削減できるからです。
ちなみに、この記事を書いた後、12 月に非常に優れたパフォーマンスを発揮する DeepSeek-V3 モデルがリリースされました。これは MoE アーキテクチャを採用しています。つまり、MoE は引き続き非常に重要なのです!
- 2月:Weight-decomposed LoRA
オープンウェイトの LLM をファインチューニングしている場合、パラメータ効率の良い LLM ファインチューニング手法である低ランク適応(LoRA)をどこかで使用したことがある可能性が高いでしょう。
LoRA が初めての方のために、LoRA(Low-Rank Adaptation)を用いた大規模言語モデルのファインチューニングに関する実践的なヒントについて以前記事を書いていますので、そちらもご参考ください。また、私の著書『Build A Large Language Model (From Scratch)』の付録 D には、ゼロから実装したコードも掲載しています。
LoRA は非常に人気があり広く使われている手法であること、そしてより新しいバリアントの実装や実験を楽しんだ経験があることから、2 月の選定論文として Liu と同僚による「DoRA: Weight-Decomposed Low-Rank Adaptation(2024 年 2 月)」を選びました。
2.2 LoRA の復習
DoRA を紹介する前に、LoRA の簡単な復習をしましょう。
フルファインチューニングでは、大規模言語モデル内の各大きな重み行列 W を更新するために、大きな重み更新行列 ΔW を計算します。一方、LoRA はこの ΔW を 2 つのより小さな行列 A と B の積として近似します。つまり、W + ΔW の代わりに W + A・B という形式になります。これにより、計算量とメモリオーバーヘッドが大幅に削減されます。
下の図は、フルファインチューニング(左側)と LoRA(右側)の公式を並べて示したものです。

通常のファインチューニング(左側)と LoRA ファインチューニング(右側)のイラスト。
2.2 LoRA から DoRA へ
2024 年 2 月に発表された「DoRA: Weight-Decomposed Low-Rank Adaptation(重み分解低ランク適応)」において、Liu らは LoRA を拡張し、事前学習済みの重み行列をまず 2 つの部分に分解します。1 つは大きさのベクトル m、もう 1 つは方向性の行列 V です。この分解は、任意のベクトルはその長さ(大きさ)と向き(方位)によって表現できるという考えに基づいています。ここでは、重み行列の各列ベクトルに対してこれを適用します。m と V を得た後、DoRA は LoRA 様式の低ランク更新を方向性の行列 V のみに適用し、大きさのベクトル m は別途学習できるようにします。

DoRA 論文(https://arxiv.org/abs/2402.09353)からの注釈付き図解
この 2 ステップのアプローチにより、DoRA は標準的な LoRA よりも柔軟性を得ています。LoRA が一般的に行うように大きさも方向も均一にスケーリングするのではなく、DoRA は大きさを必ずしも増やすことなく、微妙な方向性の調整を行うことができます。その結果、性能と頑健性が向上し、DoRA はパラメータ数を少なくしても LoRA を上回る性能を発揮し、ランクの選択に対する感度も低くなります。
なお、残りが10件あるためこのセクションは簡潔に保ちますが、この手法の詳細については今年初めに別の記事を執筆しました:『Improving LoRA: Implementing Weight-Decomposed Low-Rank Adaptation (DoRA) from Scratch』。
2.3 LoRA および LoRA 類似手法の未来
DoRA は元の LoRA 手法に対する小さな論理的な改善です。まだ広く採用されてはいませんが、複雑さを最小限に抑えつつ、LLM のファインチューニングを行う際に次回の選択肢として検討する価値があります。一般的に、LoRA および同様の手法は引き続き人気を維持すると予想されます。例えば、Apple は最近の『Apple Intelligence Foundation Language Models』論文において、オンデバイスでの LLM タスク特化に LoRA を使用していると明言しています。
Ahead of AI は読者支援型の出版物です。新しい投稿を受け取り、私の活動をサポートしたい方は、無料または有料の購読者になることを検討してください。
- 3月:LLM の継続的事前トレーニングに関するヒント
私が把握する限り、インストラクションファインチューニングは LLM 実践者の間で最も一般的なファインチューニング形式です。ここでは、公開されている LLM が指示をよりよく従うようにしたり、特定のサブセットや新しい指示に特化させたりすることが目的です。
しかし、新たな知識を取り込むという点においては、継続的事前トレーニング(continually pretraining と呼ばれることもあります)が最適なアプローチとなります。
このセクションでは、Ibrahim と同僚らが執筆した「大規模言語モデルの継続的事前学習のためのシンプルかつスケーラブルな戦略(2024 年 3 月)」という論文について、簡潔に要約したいと思います。
3.1 シンプルな手法が機能する
この 24 ページからなる「大規模言語モデルの継続的事前学習」論文は、多数の実験結果と無数の図表を報告しており、今日の基準から見ても非常に徹底した内容です。
継続的事前学習を成功させるための主なヒントは何でしょうか?
- 学習率を単純に再ウォーミング(再昇温)し、再デケイ(再減衰)する。
- 大規模忘却を防ぐために、新しいデータセットに元の事前学習データの少量(例えば 5%)を追加する。なお、0.5% や 1% のようなより小さな割合でも効果的であることが確認されています。
ポイント 1 の「再ウォーミングと再デケイ」についてもう少し具体的に説明すると、これは大規模言語モデルの初期事前学習段階で使用されたのと同じ学習率スケジュールをそのまま採用することを意味します。下の図をご覧ください。

継続的事前学習のためのスケジュール。図は『Scratch から大規模言語モデルを構築する』に基づいています。https://github.com/rasbt/LLMs-from-scratch/blob/main/appendix-D/01_main-chapter-code/appendix-D.ipynb
私の知る限り、再暖化と再減衰、および新しいデータへのオリジナルの事前トレーニングデータの追加は、ある程度一般的な知識となっています。しかし、研究者がこの非常に詳細な 24 ページのレポートでこの方法を正式にテストしてくれたことには、本当に感謝しています。
追加の詳細に興味がある場合は、私の以前の「LLM の事前トレーニングと報酬モデルの評価に関するヒント」という記事でこの論文についてより詳しく議論しました。
3.2 これらの単純なテクニックは将来も機能し続けるのか?
これらの手法が今後の LLM(大規模言語モデル)でも機能しないという理由はありません。しかし、最近の数月で事前トレーニングパイプラインが多段階化し、短期および長期コンテキスト事前トレーニングなどを含むより洗練されたものになっている点に注意することが重要です。(私は「新しい LLM 事前トレーニングと事後トレーニングのパラダイム」についてさらに詳しく書いています)。
したがって、最適な結果を得るためには、この論文で提案されているレシピは特定の状況下で調整が必要になる可能性があります。
- 4 月:LLM のアライメントには DPO か PPO か、それとも両方か?
4 月は難しい選択です。例えば、コルモゴロフ・アルノルドネットワーク(Kolmogorov-Arnold Networks)はその月に大きな波紋を広げました。しかし、私が判断する限り、その興奮はすぐに冷めてしまいました。おそらく、理論的保証が実用的に実装しにくいこと、競争力のある結果やベンチマークが不足していること、他のアーキテクチャの方がはるかにスケーラブルであることが理由です。
したがって、4月の私の選定は、より実践的な論文である「LLM 整列において DPO は PPO よりも優れているか?包括的研究(2024 年 4 月)」に捧げます。著者は Xu とその同僚です。
4.1 RLHF-PPO と DPO:それらとは何か?
論文自体を要約する前に、Reinforcement Learning with Human Feedback (RLHF) を通じて LLM を整列させるための人気のある手法である Proximal Policy Optimization (PPO) と Direct Preference Optimization (DPO) の概要を紹介します。RLHF は、LLM を人間の嗜好に整合させるための選択された方法であり、応答の質を向上させるだけでなく安全性も高めます。

典型的な(簡略化された)LLM 訓練ライフサイクル。
従来、RLHF-PPO は InstructGPT や ChatGPT などのモデルやプラットフォーム向けに LLM を訓練する上で重要なステップでした。しかし、DPO はそのシンプルさと効果性により昨年から注目され始めています。RLHF-PPO と対照的に、DPO は独立した報酬モデルを必要としません。代わりに、分類のような目的関数を用いて LLM を直接更新します。多くの LLM が DPO を利用していますが、PPO との包括的な比較はまだ不足しています。
以下は、今年初めに私が開発し共有した RLHF と DPO に関する2つのリソースです:
LLM Training: RLHF and Its Alternatives
Direct Preference Optimization (DPO) for LLM Alignment (From Scratch)
4.2 PPO は通常 DPO よりも優れた性能を示す
「LLM 整列において DPO が PPO よりも優れているか?包括的な研究」という論文は、多くの実験と結果を伴う良質な著作です。その主要な結論は、PPO が DPO を凌駕する傾向にあること、および DPO は分布外データ(out-of-distribution data)の処理においては劣っているという点です。
ここで言う「分布外データ」とは、言語モデルが DPO 用の選好データとは異なる指示データ(教師あり微調整を通じて)で事前に訓練されている場合を指します。例えば、あるモデルは一般的な Alpaca データセットで訓練された後、異なる選好ラベル付きデータセット上で DPO の微調整を行うことがあります。(ただし、このような分布外データにおける DPO の性能を向上させる一つの方法として、まず選好データセットを用いて教師ありの指示微調整ステップを行い、その後に DPO による微調整を実行するという手順があります。)
主要な発見は以下の図に要約されています。

「LLM 整列において DPO が PPO よりも優れているか?包括的な研究」(https://arxiv.org/abs/2404.10719)論文からの注釈付き表。
4.3 今日、PPO と DPO はどのように利用されているのか?
PPO は、生成される大規模言語モデル(LLM)の純粋なモデリング性能においてはわずかに優位性があるかもしれません。しかし、DPO は実装がはるかに容易であり、計算資源も効率的に適用できます(結局のところ、別途報酬モデルを訓練して使用する必要がないためです)。したがって、私の知る限りにおいて、DPO は実際には RLHF-PPO よりもはるかに広く利用されています。
興味深い例として、Meta AI の Llama モデルがあります。Llama 2 は RLHF-PPO で訓練されましたが、より新しい Llama 3 モデルでは DPO が使用されています。
さらに興味深いことに、最近のモデルでは現在 PPO と DPO の両方を組み合わせて使用するケースさえあります。最新の例としては、Apple の Foundation Models や Allen AI の Tulu 3 が挙げられます。
- 5 月:LoRA はより少なく学び、より少なく忘却する
今年もまた LoRA に関する論文を一つ見つけました(これは 12 本の論文から選んだ LoRA 関連の最後の論文です、約束します!)。画期的だと呼ぶわけではありませんが、(LoRA を用いた場合と用いない場合の) LLM のファインチューニングに関する一般的な知見の一部を形式化した点で非常に気に入っています。Biderman らによる「LoRA Learns Less and Forgets Less」(2024 年 5 月)です。
「LoRA Learns Less and Forgets Less」は、大規模言語モデル(LLM)における低ランク適応(LoRA)と完全ファインチューニングを比較した実証研究であり、プログラミングと数学の 2 つのドメイン、および指示ファインチューニングと継続的事前学習の 2 つのタスクに焦点を当てています。先に進む前に LoRA の復習をしたい場合は、上記の 2 月のセクションをご覧ください。
5.1 LoRA はより少なく学ぶ
「LoRA Learns Less and Forgets Less」の研究では、LoRA はフルファインチューニングに比べて明らかに少ない学習しか行わないことが示されており、特にコーディングのような新しい知識の習得が必要なタスクにおいてその差が顕著です。この差は、指示従順化(instruction following)のみを目的としたファインチューニングを行う場合には小さくなります。これは、新しいデータでの事前トレーニング(新しい知識の学習)が、事前学習済みモデルを指示従順なモデルに変換するよりも、フルファインチューニングからより大きな恩恵を受けることを示唆しています。

フルファインチューニングと LoRA の比較。パフォーマンスは、164 のコーディング課題から構成されるデータセットである HumanEval 上で測定されています。図出典:LoRA Learns Less and Forgets Less, https://arxiv.org/abs/2405.09673。
ただし、いくつかの微妙な違いもあります。例えば数学タスクにおいては、LoRA とフルファインチューニングの差は縮小します。これは、数学問題が大規模言語モデル(LLM)にとってより身近であり、事前トレーニング中に類似の問題に遭遇している可能性が高いからです。一方、コーディングはより明確に異なるドメインを扱っており、より多くの新しい知識を必要とします。したがって、新しいタスクがモデルの事前学習データから遠ざかるほど、学習能力の観点からはフルファインチューニングの恩恵は大きくなります。
5.2 LoRA は忘れにくい
以前に獲得した知識がどれだけ失われるかを検討すると、LoRA は一貫してより少ない忘却を示します。これは特に、ソースドメインから遠く離れたデータ(例えばコーディング)に適応する際に明確です。コーディングタスクでは、フルファインチューニングは著しい忘却を引き起こしますが、LoRA は元の能力をより多く保持します。数学においては、モデルの元々の知識が新しいタスクにすでに近いため、その差はそれほど顕著ではありません。

プログラミングデータでのトレーニング後の、元のソースタスクにおけるフルファインチューニングと LoRA の比較。LoRA Learns Less and Forgets Less(https://arxiv.org/abs/2405.09673)からの注釈付き図。
5.3 LoRA のトレードオフ
全体として、トレードオフが存在します:フルファインチューニングはより遠いドメインからの新しい知識を吸収するには優れていますが、以前に学習したタスクの忘却がより多くなります。一方、LoRA はパラメータの変更数を減らすことで、新しい情報をより少なく学びますが、元の能力をより多く保持します。
5.4 大規模言語モデル(LLM)ファインチューニングへの今後のアプローチ
本研究は主に LoRA とフルファインチューニングを比較しています。実際には、LoRA はフルファインチューニングに比べてはるかにリソース効率が良いため、人気を集めています。多くの場合、ハードウェアの制約によりフルファインチューニングは単に実行不可能です。さらに、専門的なアプリケーションへの対応のみが必要な場合は、LoRA だけでも十分な場合があります。LoRA アダプターはベースとなる大規模言語モデル(LLM)とは別に保存できるため、新しい機能を追加しながらも元の能力を維持することが容易です。また、知識の更新にはフルファインチューニングを、その後の専門化には LoRA を用いることで、両方の方法を組み合わせることも可能です。
要するに、今後数年において両方の手法が引き続き非常に重要であると考えます。重要なのは、目の前のタスクに対して適切なアプローチを選択することです。
Ahead of AI は読者支援型の出版物です。新しい投稿を受け取り、私の活動をサポートするには、無料または有料の購読者になることを検討してください。
6 月:15 トリリオントークンの FineWeb データセット
Penedo らによる「The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale(2024 年 6 月)」論文は、大規模言語モデル向けの 15 トリリオントークン規模のデータセットを作成し、それを公開したことを記述しています。これには
原文を表示
To kick off the year, I've finally been able to complete the draft of this AI Research Highlights of 2024 article. It covers a variety of topics, from mixture-of-experts models to new LLM scaling laws for precision.
Reflecting on all the major research highlights of 2024 would probably require writing an entire book. It's been an extraordinarily productive year, even for such a fast-moving field. To keep things reasonably concise, I decided to focus exclusively on LLM research this year. But even then, how does one choose a subset of papers from such an eventful year? The simplest approach I could think of was to highlight one paper per month: January through December 2024.
So, in this article, I'll share research papers that I personally found fascinating, impactful, or, ideally, both. However, note that this article is just Part One, focusing on the first half of 2024 from January through June. Part 2 of this series, covering July to December, will be shared later in January.
The selection criteria are admittedly subjective, based on what stood out to me this year. I've also aimed for some variety, so it's not all just about LLM model releases.
If you're looking for a broader list of AI research papers, feel free to check out my earlier article (LLM Research Papers: The 2024 List).
For those who read my previous article, I’m happy to share that I’m already feeling a bit better and slowly but steadily recovering! I also want to express my heartfelt thanks for all the kind wishes and support. It truly meant the world to me and helped me through some tough days!
Happy new year and happy reading!
- January: Mixtral's Mixture of Experts Approach
Only a few days into January 2024, the Mistral AI team shared the Mixtral of Experts paper (8 Jan 2024), which described Mixtral 8x7B, a Sparse Mixture of Experts (SMoE) model.
The paper and model were both very influential at the time, as Mixtral 8x7B was (one of) the first open-weight MoE LLMs with an impressive performance: it outperformed Llama 2 70B and GPT-3.5 across various benchmarks.
1.1 Understanding MoE models
An MoE, or Mixture of Experts, is an ensemble model that combines several smaller "expert" subnetworks inside the GPT-like decoder architecture. Each subnetwork is said to be responsible for handling different types of tasks or, more concretely, tokens. The idea here is that by using multiple smaller subnetworks instead of one large network, MoEs aim to allocate computational resources more efficiently.
In particular, in Mixtral 8x7B, is to replace each feed-forward module in a transformer architecture with 8 expert layers, as illustrated in the figure below.

Annotated transformer architecture from Attention Is All You Need, https://arxiv.org/abs/1706.03762
"Sparse" in the context of a "Sparse Mixture of Experts" refers to the fact that at any given time, only a subset of the expert layers (typically 1 or 2 out of the 8 in Mixtral 8x7B) are actively used for processing a token.
As illustrated in the figure above, the subnetworks replace the feed-forward module in the LLM. A feed-forward module is essentially a multilayer perceptron. In PyTorch-like pseudocode, it essentially looks like this:
class FeedForward(torch.nn.Module):
def __init__(self, embed_dim, coef):
super().__init__()
self.layers = nn.Sequential(
torch.nn.Linear(embed_dim, coef*embed_dim),
torch.nn.ReLU(),
torch.nn.Linear(coef*n_embed, embed_dim),
torch.nn.Dropout(dropout)
)
def forward(self, x):
return self.layers(x)In addition, there is also a Router module (also known as a gating network) that redirects each of the token embeddings to the 8 expert feed-forward modules, where only a subset of these experts are active at a time.
Since there are 11 more papers to cover in this article, I want to keep this description of the Mixtral model brief. However, you can find additional details in my previous article, Model Merging, Mixtures of Experts, and Towards Smaller LLMs.
1.2 The relevance of MoE models today
At the beginning of the year, I would have thought that open-weight MoE models would be more popular and widely used than they are today. While they are not irrelevant, many state-of-the-art models still rely on dense (traditional) LLMs rather than MoEs though, e.g., Llama 3, Qwen 2.5, Gemma 2, etc. However, it is, of course, impossible to say what proprietary architectures like GPT-4, Gemini, and Claude are based on; they might as well be using MoE under the hood.
In any case, MoE architectures are still relevant, especially as they offer a way to scale large language models efficiently by activating only a subset of the model's parameters for each input, thus reducing computation costs without sacrificing model capacity.
By the way, after writing this article, there was a nice surprise release of the very well-performing DeepSeek-V3 model in December, which uses a MoE architecture. So, yes, MoEs continue to be very relevant!
- February: Weight-decomposed LoRA
If you are finetuning open-weight LLMs, chances are high that you have been using low-rank adaptation (LoRA), a method for parameter-efficient LLM finetuning, at some point.
If you are new to LoRA, I have written a previous article on Practical Tips for Finetuning LLMs Using LoRA (Low-Rank Adaptation) that you might helpful, and I have a from-scratch code implementation in Appendix D of my Build A Large Language Model (From Scratch) book.
Since LoRA is such a popular and widely used method, and since I had so much fun implementing and playing with a newer variant, my pick for February is DoRA: Weight-Decomposed Low-Rank Adaptation (February 2024) by Liu and colleagues.
2.2 LoRA Recap
Before introducing DoRA, here’s a quick LoRA refresher:
Full finetuning updates each large weight matrix W in an LLM by computing a large weight update matrix ΔW. LoRA approximates ΔW as the product of two smaller matrices A and B. So, Instead of W + ΔW, we have W + A.B. This greatly reduces computational and memory overhead.
The figure below illustrates these formulas for full finetuning (left) and LoRA (right) side by side.

An illustration of regular finetuning (left) and LoRA finetuning (right).
2.2 From LoRA to DoRA
In DoRA: Weight-Decomposed Low-Rank Adaptation (February 2024), Liu and colleagues.extend LoRA by first decomposing a pretrained weight matrix into two parts: a magnitude vector m and a directional matrix V. This decomposition is rooted in the idea that any vector can be represented by its length (magnitude) and direction (orientation), and here we apply it to each column vector of a weight matrix. Once we have m and V, DoRA applies LoRA-style low-rank updates only to the directional matrix V, while allowing the magnitude vector m to be trained separately.

Annotated illustration from the DoRA paper (https://arxiv.org/abs/2402.09353)
This two-step approach gives DoRA more flexibility than standard LoRA. Rather than uniformly scaling both magnitude and direction as LoRA tends to do, DoRA can make subtle directional adjustments without necessarily increasing the magnitude. The result is improved performance and robustness, as DoRA can outperform LoRA even when using fewer parameters and is less sensitive to the choice of rank.
Again, I am keeping this section brief since there are 10 more to go, but if you are interested in additional details, I dedicated a whole article to this method earlier this year: Improving LoRA: Implementing Weight-Decomposed Low-Rank Adaptation (DoRA) from Scratch.
2.3 The future of LoRA and LoRA-like methods
DoRA is a small, logical improvement over the original LoRA method. While it hasn’t been widely adopted yet, it adds minimal complexity and is worth considering the next time you finetune an LLM. In general, I expect LoRA and similar methods to remain popular. For example, Apple recently mentioned in their Apple Intelligence Foundation Language Models paper that they use LoRA for on-device task specialization of LLMs.
Ahead of AI is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
- March: Tips for Continually Pretraining LLMs
As far as I can tell, instruction-finetuning is the most popular form of finetuning by LLM practitioners. The goal here is to get openly available LLMs to better follow instructions or specialize these LLMs on subsets or new instructions.
However, when it comes to taking in new knowledge, continued pretraining (sometimes also referred to continually pretraining) is the way to go.
In this section, I want to briefly summarize the refreshingly straightforward Simple and Scalable Strategies to Continually Pre-train Large Language Models (March 2024) paper by Ibrahim and colleagues.
3.1 Simple techniques work
This 24-page Continually Pre-train Large Language Models paper reports a large number of experiments and comes with countless figures, which is very thorough for today's standards.
What were the main tips for applying continued pretraining successfully?
- Simple re-warming and re-decaying the learning rate.
- Adding a small portion (e.g., 5%) of the original pretraining data to the new dataset to prevent catastrophic forgetting. Note that smaller fractions like 0.5% and 1% were also effective.
To be a bit more concrete regarding point 1, re-warming and re-decaying, this means we employ the exact same learning rate schedule that was used during the initial pretraining stage of an LLM as shown in the figure below.

A schedule for continued pretraining. Figure based on Build a Large Language Model From Scratch, https://github.com/rasbt/LLMs-from-scratch/blob/main/appendix-D/01_main-chapter-code/appendix-D.ipynb
As far as I know, the re-warming and re-decaying, as well as adding original pretraining data to the new data, is more or less common knowledge. However, I really appreciate that the researchers took the time to formally test this method in this very detailed 24-page report.
If you are interested in additional details, I discussed this paper more thoroughly in my previous Tips for LLM Pretraining and Evaluating Reward Models article.
3.2 Will these simple techniques continue to work?
I have no reason to believe that these methods will not continue to work for future LLMs. However, it is important to note that pretraining pipelines have become more sophisticated in recent months, consisting of multiple stages, including short- and long-context pretraining. (I’ve written more about it in New LLM Pre-training and Post-training Paradigms).
So, for optimal results, the recipes suggested in this paper may need to be tweaked under certain circumstances.
- April: DPO or PPO for LLM alignment, or both?
April is a tough choice. For instance, Kolmogorov-Arnold Networks made a big wave that month. But as far as I can tell, the excitement fizzled out pretty quickly. This is likely because their theoretical guarantees are difficult to implement practically, they lack competitive results or benchmarks, and other architectures are much more scalable.
So, instead, my pick for April goes to a more practical paper: Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study (April 2024) by Xu and colleagues.
4.1 RLHF-PPO and DPO: What Are They?
Before summarizing the paper itself, here's an overview of Proximal Policy Optimization (PPO) and Direct Preference Optimization (DPO), both popular methods in aligning LLMs via Reinforcement Learning with Human Feedback (RLHF). RLHF is the method of choice to align LLMs with human preferences, improving the quality but also the safety of their responses.

The typical (simplified) LLM training lifecycle.
Traditionally, RLHF-PPO has been a crucial step in training LLMs for models and platforms like InstructGPT and ChatGPT. However, DPO started gaining traction last year due to its simplicity and effectiveness. In contrast to RLHF-PPO, DPO does not require a separate reward model. Instead, it directly updates the LLM using a classification-like objective. Many LLMs now utilize DPO, although comprehensive comparisons with PPO are lacking.
Below are two resources on RLHF and DPO I developed and shared earlier this year:
LLM Training: RLHF and Its Alternatives
Direct Preference Optimization (DPO) for LLM Alignment (From Scratch)
4.2 PPO Typically Outperforms DPO
Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study is a well-written paper with numerous experiments and results. The key conclusions are that PPO tends to outperform DPO, and that DPO is inferior when dealing with out-of-distribution data.
Here, out-of-distribution data means the language model was previously trained on instruction data (via supervised finetuning) that differs from the preference data used for DPO. For instance, a model might be trained on the general Alpaca dataset before undergoing DPO finetuning on a different preference-labeled dataset. (However, one way to improve DPO on such out-of-distribution data is to first conduct a supervised instruction-finetuning step using the preference dataset, and then perform DPO finetuning.)
The main findings are summarized in the figure below.

Annotated table from the Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study (https://arxiv.org/abs/2404.10719) paper.
4.3 How are PPO and DPO used today?
PPO might have a slight edge when it comes to the raw modeling performance of the resulting LLM. However, DPO is much easier to implement and computationally more efficient to apply (you don't have to train and use a separate reward model, after all). Hence, to the best of my knowledge, DPO is also much more widely used in practice than RLHF-PPO.
One interesting example is Meta AI's Llama models. While Llama 2 was trained with RLHF-PPO, the newer Llama 3 models used DPO.
Interestingly, recent models even use both PPO and DPO nowadays. Recent examples include Apple's Foundation Models and Allen AI's Tulu 3.
- May: LoRA learns less and forgets less
I found another LoRA paper this year particularly interesting (this is the last LoRA paper in this 12-paper selection, I promise!). I wouldn't call it groundbreaking, but I really like it since it formalizes some of the common knowledge around finetuning LLMs with (and without) LoRA: LoRA Learns Less and Forgets Less (May 2024) by Biderman and colleagues.
LoRA Learns Less and Forgets Less is an empirical study comparing low-rank adaptation (LoRA) to full finetuning on large language models (LLMs), focusing on two domains (programming and mathematics) and two tasks (instruction finetuning and continued pretraining). Check out the February section above if you'd like a refresher on LoRA before proceeding.
5.1 LoRA learns less
The LoRA Learns Less and Forgets Less study shows LoRA learns noticeably less than full finetuning, especially in tasks like coding, where new knowledge needs to be acquired. The gap is smaller when only instruction finetuning is performed. This suggests that pretraining on new data (learning new knowledge) benefit more from full finetuning than converting a pretrained model into an instruction follower.

Full finetuning vs LoRA. The performance is measured on HumanEval, which is a dataset consisting of 164 coding challenges. Annotated figures from LoRA Learns Less and Forgets Less, https://arxiv.org/abs/2405.09673.
There are some more nuances, though. For math tasks, for example, the difference between LoRA and full finetuning shrinks. This may be because math problems are more familiar to the LLM, and they likely encountered similar problems during pretraining. In contrast, coding involves a more distinct domain, requiring more new knowledge. Thus, the farther a new task is from the model’s pretraining data, the more beneficial full finetuning becomes in terms of learning capacity.
5.2 LoRA forgets less
When examining how much previously acquired knowledge is lost, LoRA consistently forgets less. This is particularly clear when adapting to data far from the source domain (e.g., coding). With coding tasks, full finetuning leads to significant forgetting, while LoRA preserves more original capabilities. In math, where the model’s original knowledge was already closer to the new task, the difference is less pronounced.

Full finetuning vs LoRA on the original source tasks after training on programming data. Annotated figures from LoRA Learns Less and Forgets Less, https://arxiv.org/abs/2405.09673.
5.3 The LoRA trade-off
Overall, there is a trade-off: full finetuning is better for absorbing new knowledge from more distant domains but leads to more forgetting of previously learned tasks. LoRA, by changing fewer parameters, learns less new information but retains more of the original capabilities.
5.4 Future approaches to finetuning LLMs
The study primarily compares LoRA to full finetuning. In practice, LoRA has gained popularity because it is far more resource-efficient than full finetuning. In many cases, full finetuning is simply not feasible due to hardware constraints. Moreover, if you only need to address specialized applications, LoRA alone may be sufficient. Since LoRA adapters can be stored separately from the base LLM, it's easy to preserve the original capabilities while adding new ones. Additionally, it's possible to combine both methods by using full finetuning for knowledge updates and LoRA for subsequent specialization.
In short, I think both methods will continue to be very relevant in the upcoming year(s). It's more about using the right approach for the task at hand.
Ahead of AI is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
- June: The 15 Trillion Token FineWeb Dataset
The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale (June 2024) paper by Penedo and colleagues describes the creation of a 15 trillion token dataset for LLMs and making it publicly available, including a
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み