L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

checkpointing-and-conversion

checkpointing-and-conversion

Work with Megatron distributed checkpoints, safe loading, resharding, and GPT-Hybrid conversion.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: checkpointing-and-conversion description: "Work with Megatron distributed checkpoints, safe loading, resharding, and GPT-Hybrid conversion." metadata: disco-role: operating disable-model-invocation: true license: NOASSERTION

checkpointing-and-conversion

Use this sub-skill when the task involves Megatron checkpoint formats, save/load/resume behavior, optimizer state compatibility, distributed checkpoint resharding, PyTorch safe loading, or GPTModel ↔ HybridModel conversion.

Read first

Route by task

TaskAction
Resume training from a checkpointConfirm --load, --save, --ckpt-format, optimizer load flags, and parallelism compatibility.
Change TP/PP/EP/FSDP layoutPrefer distributed checkpoint formats and, for optimizer resharding, fully-reshardable optimizer state.
PyTorch 2.6 unsafe global errorKeep safe loading; allow-list only the required class or use the repo's safe globals guidance.
GPTModel to HybridModel migrationChoose load-time translation or offline converter; validate --hybrid-layer-pattern.
HF ↔ Megatron conversionTreat Megatron Bridge/HF conversion as an external workflow with mounts, tokens, and model-specific scripts.

Checkpoint workflow

  1. Pull checkpoint metadata first: format, root directory shape, tracker file, model args, parallel sizes, optimizer state format, and target run command.
  2. Decide whether the user needs weights-only load, full resume, finetune semantics, or format conversion.
  3. If changing parallelism, confirm the checkpoint format and optimizer state format support that change.
  4. If migrating GPT to Hybrid, validate the layer pattern before running any conversion.
  5. After any conversion or resume, run a bounded smoke before launching full training.

Boundaries

Skills enregistrées