Skip to content

Checkpoint v6: don't materialize step-0 AdamW moments — it would flip the init-cache verdict #132

Open

Description

@feitreim

PR #131 built the init-checkpoint cache the spend-economy plan called for and measured it net-negative: resuming (237.8s volume / 139.0s disk) is slower than fresh init (119.5s), because the artifact is 40.85 GiB of which 80% is AdamW moments that are zero at step 0 — bytes a fresh init never materializes (GpuTensor::zeros fills them on-device, over no bus). The read is bound by checkpoint::load itself (disk serves 1.18 GiB/s, load consumes at 300.8 MiB/s).

The fix is a checkpoint v6 that omits (or run-length-elides) zero moment tensors: artifact drops to ~8.6 GiB, and the cache's arithmetic plausibly flips to a real ~60-90s saving per trainer process (×6+ per A/B). The probe apparatus (bin/init_ckpt, feature-gated; TRAIN_CHECKPOINT_INIT read-only resume source) is in-tree from #131 specifically so this can be re-decided with one cheap measurement once v6 exists.

Constraints from #131's verification worth preserving:

  • The moe_checkpoint_gate extension must stay: a step from a resumed step-0 checkpoint and from fresh init must produce byte-identical saves.
  • Loss values only compare across processes at step 1 (embedding gradient accumulates atomically; two fresh runs diverge from step 2 as much as any resume does) — don't let a v6 validation claim more than that.
  • v5 rejection semantics: v6 must still reject config mismatches (N/C/E/K/L, schedule) as v5 does.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions