ChatPaper.aiChatPaper

Не всё потеряно: восстановление больших языковых моделей без контрольных точек

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+ копирует эти слои на соседние этапы, что требует относительно небольших накладных расходов на хранение. Мы тщательно оцениваем наш метод на моделях LLaMa размером от 124M до 1.5B с различной частотой сбоев. В случае низкой и средней частоты сбоев (5-10%) CheckFree и CheckFree+ превосходят как контрольные точки, так и избыточные вычисления по скорости сходимости в реальном времени более чем на 12%. Оба наших предложения могут быть запущены с использованием нашего кода, доступного по адресу: 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.
PDF262June 19, 2025