すべてが失われたわけではない:チェックポイントなしでのLLMリカバリ
All is Not Lost: LLM Recovery without Checkpoints
June 18, 2025
著者: Nikolay Blagoev, Oğuzhan Ersoy, Lydia Yiyu Chen
cs.AI
要旨
分散型で低性能な計算ノード(例えば、複数のオンスポットインスタンス)で大規模言語モデル(LLM)をトレーニングすることは、トレーニングコストを削減し、モデルの民主化を可能にする。しかし、ここで避けられない課題は、ノードの故障やオペレータのスケジューリングポリシーによるノードの離脱であり、これによりモデルの一部であるステージが失われることである。従来の故障からの回復手法としては、定期的にモデル全体のコピーを追加のストレージに送信するチェックポイント方式や、冗長計算が用いられてきた。これらの手法は、故障が発生しない場合でも通信や計算のオーバーヘッドが大きく、大規模モデルではスケーラビリティに問題がある。本論文では、CheckFreeという効率的な回復手法を提案する。この手法では、故障したステージを最も近い隣接ステージの重み付き平均で置き換える。従来の手法とは異なり、CheckFreeは追加の計算やストレージを必要としない。ただし、隣接ステージの平均化という性質上、中間ステージの故障のみを回復できる。さらに、CheckFree+という手法を提案し、順不同のパイプライン実行を用いて最初と最後のステージのクラッシュにも対応できるように拡張した。順不同パイプラインにより、これらのステージの動作は隣接ステージによって模倣され、CheckFree+は隣接ステージの重みを単純にコピーすることで回復を実現する。(デ)エンベディング層を回復するために、CheckFree+はこれらの層を隣接ステージにコピーし、比較的小さなストレージオーバーヘッドを必要とする。我々は、124Mから1.5BまでのモデルサイズのLLaMaモデルを用いて、様々な故障頻度で本手法を詳細に評価した。低および中程度の故障率(5-10%)の場合、CheckFreeとCheckFree+は、ウォールクロック時間における収束性において、チェックポイント方式や冗長計算を12%以上上回る性能を示した。提案手法は、以下のURLで公開されているコードで実行可能である:https://github.com/gensyn-ai/CheckFree。
English
Training LLMs on decentralized and wimpy computation nodes, e.g., multiple
on-spot instances, lowers the training cost and enables model democratization.
The inevitable challenge here is the churn of nodes due to failures and the
operator's scheduling policies, leading to losing a stage - a part of the
model. The conventional approaches to recover from failures are to either use
checkpointing, where periodically a copy of the entire model is sent to an
additional storage, or redundant computation. These approaches yield
significant communication and/or computation overhead even in non-failure cases
and scale poorly in settings with large models. In this paper, we propose,
CheckFree, an efficient recovery method where a failing stage is substituted by
a weighted average of the closest neighboring stages. In contrast to the state
of the art, CheckFree requires no additional computation or storage. However,
because of the nature of averaging neighbouring stages, it can only recover
failures of intermediate stages. We further extend our method to CheckFree+
with out-of-order pipeline execution to tolerate crashes of the first and last
stages. Thanks to out-of-order pipelining, behaviour of those stages is
mimicked by their neighboring ones, which allows CheckFree+ to recover them by
simply copying the weights from the immediate neighbour. To be able to recover
the (de)embedding layers, CheckFree+ copies those layers to the neighboring
stages, which requires relatively small storage overhead. We extensively
evaluate our method on LLaMa models of model sizes from 124M to 1.5B with
varying failure frequencies. In the case of low and medium failure rates
(5-10%), CheckFree and CheckFree+ outperform both checkpointing and redundant
computation in terms of convergence in wall-clock time by over 12%. Both of our
proposals can be run via our code available at:
https://github.com/gensyn-ai/CheckFree.