Przejdź do treści
Biblioteka skilli
AI i agenci · Budowanie i kod

checkpointing-large-training

/checkpointing-large-training

Wykonuje checkpointy wielowęzłowych treningów tak, żeby zapis trwał sekundy zamiast minut, a wznowienie dokładnie odtwarzało przebieg, w zadaniach, gdzie awaria oznacza stratę godzin GPU.

Repozytorium
AI-SKILLS ↗
Licencja
MIT
Ostatnia zmiana repozytorium
05.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wykonuje checkpointy wielowęzłowych treningów tak, żeby zapis trwał sekundy zamiast minut, a wznowienie dokładnie odtwarzało przebieg, w zadaniach, gdzie awaria oznacza stratę godzin GPU.

Oryginalny opis (EN)

Checkpoint multi-node training runs so a save costs seconds instead of minutes and a resume reproduces the run exactly. Use when a job is large enough that a crash without a recent, verified checkpoint means losing hours of GPU time.

Jak działa

  1. Method
  2. Checks
  3. Boundaries
Sekcje z nagłówków SKILL.md, w oryginale · 57 linii, 478 słów
Podgląd SKILL.md
---
name: checkpointing-large-training
description: Checkpoint multi-node training runs so a save costs seconds instead of minutes and a resume reproduces the run exactly. Use when a job is large enough that a crash without a recent, verified checkpoint means losing hours of GPU time.
---

# Checkpointing large training

A checkpoint for a 70-billion-parameter run is hundreds of gigabytes spread
across every rank. Save it naively and each write stalls all GPUs for minutes
while they push through a shared filesystem, so people checkpoint rarely and
lose a whole shift of compute when one node dies. The method makes saves cheap
and resumes trustworthy.

## Method

1. **Shard the checkpoint, do not gather it.** Use PyTorch Distributed
   Checkpoint (DCP) or FSDP/DeepSpeed sharded save so each rank writes only its
   own parameter and optimizer shard. Gathering a 70B model to rank 0 needs
   over a terabyte of host RAM for fp32 weights plus Adam moments and serializes
   the write; sharded save spreads it across every rank and the full filesystem
   bandwidth at once.
2. **Flush asynchronously.** Copy each shard to pinned host memory on the GPU
   stream, then let a background thread write to storage while training resumes.
   torch DCP `async_save` and NeMo async checkpointing cut the GPU stall from
   minutes to a few seconds. Block the next save only until the previous flush
   completes.
3. **Set the cadence from the failure rate, not epochs.** Pick an interval where
   the expected lost work stays small: on a 512-GPU job, save every 15 to 30
   minutes. Persist step number, RNG state, dataloader position, and LR
   scheduler state, not just weights, or resume silently replays or skips data.
4. **Write atomically and keep a rolling window.** Write to a temp path and
   rename only after every rank reports success, so a crash mid-write never
   leaves a half-checkpoint that resume trusts. Retain the last two or three
   checkpoints plus periodic milestones and delete older shards before they
   fill the filesystem.
5. **Verify resume, do not assume it.** After a save, load into a fresh process
   and assert the loss on one fixed batch matches the pre-save value within
   floating-point tolerance. A resume that runs but diverges almost always means
   missing RNG or optimizer state.
6. **Separate the storage tiers.** Stage hot checkpoints to node-local NVMe or a
   parallel filesystem (Lustre, GPFS), then async-copy milestones to object
   storage (S3) for durability. Do not checkpoint straight to S3 on the hot
   path: its latency spikes stall the save.

## Checks

- Does a save stall the training step by under five seconds at your model size?
- Does resuming reproduce the loss curve, not merely start running again?
- If you `kill -9` a rank mid-save, does the previous checkpoint still load
  clean?
- Do checkpoints include RNG, dataloader offset, optimizer moments, and
  scheduler state?

## Boundaries

This covers saving and resuming the state of one run. It does not decide when to
abandon a run, nor orchestrate the relaunch after a node dies (see
fault-tolerant-training). Shard layout must match your parallelism: a checkpoint
saved under one FSDP or tensor-parallel topology needs a resharding pass to load
under another.

Wersje

W bazie nie ma innych skilli o nazwie checkpointing-large-training.

Migawka bazy z 13.11.2026 · wersja paczki 4b3a4dca4643 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100ml-checkpoint-resume
    Pomaga zapisywać i wczytywać punkty kontrolne treningu w PyTorch, by przebieg wznowił się dokładnie tam, gdzie się zatrzymał.
  • 90fault-tolerant-training
    Utrzymuje długie zadanie treningowe przy awariach GPU, wyłączeniach węzłów i wolnych węzłach, tak by jeden zły host kosztował minuty zamiast całego przebiegu.
  • 100model-checkpoint-manager
    Prawdopodobnie zarządza punktami kontrolnymi modeli w ramach kategorii ML Training.
  • 100model-training
    Trenuje modele uczenia maszynowego od początku do końca: ładowanie danych, preprocessing, dobór architektury, pętle treningowe, walidacja i checkpointy.
  • 100weights-and-biases-training-telemetry
    Śledzi przebiegi treningu modeli głębokich w W&B: stratę, gradienty, wykorzystanie GPU i wersje zbiorów danych.
  • 100qwen-training-checkpoint-eval
    Ocenia zapisane checkpointy treningowe Qwen na próbkach z partii i w ścieżce ewaluacji, przed promocją modelu.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.