Skip to content

Commit c0adc70

Browse files
committed
docs(model-card): verify DeepSeek V4 checkpoint resume
Signed-off-by: Chen Cui <chcui@nvidia.com>
1 parent 098656c commit c0adc70

2 files changed

Lines changed: 56 additions & 33 deletions

File tree

‎examples/model_verification_cards/deepseek-v4-flash/card.yaml‎

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ summary: >
1212
The verified 64-GPU GB200 MXFP8 library pretraining run uses
1313
PP4/VPP4/EP16 with imported model weights, natural routing, grouped GEMM, TE fused
1414
cross entropy, and selective recompute without activation offload. It completed
15-
100 finite steps and saved a model-only grouped-MXFP8 checkpoint at step 100.
16-
Formal checkpoint-resume verification remains separate because it requires the
17-
step-50 sentinel comparison below. A capacity-1.5
15+
100 finite steps with full-state checkpoints at steps 50 and 100. A direct
16+
step-50 continuation restored optimizer, scheduler, data-order, and RNG state,
17+
completed steps 51-100, and passed both loss-sentinel comparisons. A capacity-1.5
1818
performance screen averaged 206.56 TFLOP/s/GPU over steps 2-8, but dropped 66.16% of expert
1919
assignments and 64.23% of routing probability mass; that result is benchmark-only and
2020
is excluded from the natural-routing library recipe and verification metrics. CPU
@@ -50,8 +50,7 @@ verification_index:
5050
- megatron_to_hf_cpu
5151
training:
5252
GB200:
53-
verified: [pretrain, sft, sft_long_context, sft_export_inference, peft]
54-
unverified: [checkpoint_resume]
53+
verified: [pretrain, sft, sft_long_context, sft_export_inference, peft, checkpoint_resume]
5554
performance:
5655
GB200: verified
5756
GB300: verified
@@ -195,21 +194,20 @@ items:
195194
validation.eval_interval=0 validation.eval_iters=0
196195
ddp.check_for_nan_in_grad=true ddp.check_for_large_grads=true
197196
rerun_state_machine.check_for_nan_in_loss=true
198-
checkpoint.exit_on_missing_checkpoint=false checkpoint.load=null
199-
checkpoint.load_optim=false checkpoint.load_rng=false checkpoint.save_optim=false
197+
checkpoint.exit_on_missing_checkpoint=false checkpoint.finetune=false
198+
checkpoint.load=null checkpoint.load_optim=false checkpoint.load_rng=false
199+
checkpoint.save_optim=true checkpoint.save_rng=true checkpoint.async_save=false
200200
--save_dir work/model-verification/dsv4-flash/pretrain-ref
201-
--save_interval 100
201+
--save_interval 50
202202
logger.log_interval=1 logger.log_throughput=true logger.tensorboard_dir=null
203203
dist.distributed_timeout_minutes=120
204204
last_verified: 2026-08-27
205205
metrics:
206-
initial_loss: 7.250136
207-
final_loss: 3.237480
208-
last_10_steps_step_time_ms_avg: 8482.070
209-
last_10_steps_model_tflops_per_gpu_avg: 175.950
210-
last_10_steps_tokens_per_second_per_gpu_avg: 1931.603960
211-
peak_allocated_memory_gib: 159.93
212-
peak_reserved_memory_gib: 162.06
206+
initial_loss: 7.250204
207+
final_loss: 3.280722
208+
last_10_steps_step_time_ms_avg: 7856.370
209+
last_10_steps_model_tflops_per_gpu_avg: 189.690
210+
last_10_steps_tokens_per_second_per_gpu_avg: 2085.441495
213211
expected_result: >
214212
On 64 GB200 (16 nodes x 4 GPUs), TP1/PP4/VPP4/EP16/CP1 uses dense DP16,
215213
expert DP1, and GBS/MBS 256/1. The command loads the imported model weights
@@ -218,10 +216,11 @@ items:
218216
mla_up_proj, and MXFP8 parameter gather and gradient-buffer reuse without
219217
activation offload. Expert capacity, paged stash, CUDA graphs, and forced
220218
load balancing remain disabled. The run completed 100 finite LM/MTP-loss
221-
steps with no skipped or NaN iterations and wrote a complete model-only
222-
grouped-MXFP8 checkpoint at step 100. The item-specific Bridge revision
223-
pins the compatible Megatron-LM dev revision used by this workload without
224-
changing the card's default environment for other verification items.
219+
steps with no skipped or NaN iterations and wrote complete grouped-MXFP8
220+
checkpoints containing model, optimizer, scheduler, data-order, and RNG
221+
state at steps 50 and 100. The item-specific Bridge revision pins the
222+
compatible Megatron-LM dev revision used by this workload without changing
223+
the card's default environment for other verification items.
225224
226225
sft:
227226
GB200:
@@ -419,29 +418,52 @@ items:
419418
420419
checkpoint_resume:
421420
GB200:
422-
status: unverified
421+
status: verified
423422
precision: fp8_mx
423+
bridge_commit: dff6445009ebd054028a883ea6d84f9a16ad6b9c # pragma: allowlist secret
424424
depends_on: pretrain
425-
command: null
426-
last_verified: null
425+
command: >
426+
./scripts/training/train.sh --nodes 16 --gpus-per-node 4
427+
--recipe deepseek_v4_flash_pretrain_128gpu_gb200_fp8mx_library_config
428+
--mode pretrain --dataset megatron-indexed --max_steps 100
429+
'dataset.blend=[["work/data/the-pile/my-gpt3_08_text_document"],null]'
430+
dataset.path_to_cache=work/cache/the-pile dataset.num_workers=0
431+
dataset.random_seed=1234 rng.seed=1234
432+
scheduler.lr_warmup_iters=10 scheduler.lr_decay_iters=100
433+
validation.eval_interval=0 validation.eval_iters=0
434+
ddp.check_for_nan_in_grad=true ddp.check_for_large_grads=true
435+
rerun_state_machine.check_for_nan_in_loss=true
436+
checkpoint.exit_on_missing_checkpoint=false checkpoint.finetune=false
437+
checkpoint.load_optim=true checkpoint.load_rng=true
438+
checkpoint.save_optim=true checkpoint.save_rng=true checkpoint.async_save=false
439+
--load_dir work/model-verification/dsv4-flash/pretrain-ref
440+
--save_dir work/model-verification/dsv4-flash/pretrain-resumed
441+
--save_interval 50 checkpoint.ckpt_step=50
442+
logger.log_interval=1 logger.log_throughput=true logger.tensorboard_dir=null
443+
dist.distributed_timeout_minutes=120
444+
last_verified: 2026-08-27
427445
metrics:
428-
initial_loss: null
429-
final_loss: null
430-
last_10_steps_step_time_ms_avg: null
431-
last_10_steps_model_tflops_per_gpu_avg: null
432-
last_10_steps_tokens_per_second_per_gpu_avg: null
446+
initial_loss: 4.028752
447+
final_loss: 3.261145
448+
last_10_steps_step_time_ms_avg: 7995.850
449+
last_10_steps_model_tflops_per_gpu_avg: 186.640
450+
last_10_steps_tokens_per_second_per_gpu_avg: 2049.062951
433451
resume_comparison:
434452
reference_item: pretrain
435453
sentinel_steps: [51, 100]
436454
loss_relative_tolerance: 1.0e-2
437455
loss_absolute_tolerance: 1.0e-6
438-
sentinels_match: false
456+
sentinels_match: true
439457
expected_result: >
440-
Verification requires a new uninterrupted reference run that saves a step-50
441-
checkpoint, followed by a fresh process that restores optimizer, scheduler,
442-
data-order, and RNG state and runs steps 51-100 in a separate output root.
443-
Step-51 and step-100 losses must match the uninterrupted reference within the
444-
declared 1% relative and 1e-6 absolute tolerances, and all five metrics must be recorded.
458+
The direct 64-GPU TP1/PP4/VPP4/EP16 continuation restores model, optimizer,
459+
scheduler, data-order, and RNG state from the complete step-50 reference
460+
checkpoint, starts at step 51, and finishes at step 100 in a distinct output
461+
root. All 50 resumed steps are finite with no skipped or NaN iterations, all
462+
five metrics are recorded, the post-setup configuration persists, and a
463+
complete full-state step-100 checkpoint is saved. Step-51 resumed/reference
464+
LM loss is 4.028752/4.028773, an absolute difference of 0.000021. Step-100
465+
resumed/reference LM loss is 3.261145/3.280722, an absolute difference of
466+
0.019577. Both sentinels pass the declared 1% relative and 1e-6 absolute gate.
445467
446468
pretrain_performance:
447469
GB200:

‎tests/unit_tests/skills/create_model_verification_card/test_validate_card.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
("deepseek-v3", "pretrain_performance", "GB200"): (4096, 4096, 256),
2323
("deepseek-v3", "pretrain_performance", "GB300"): (4096, 4096, 256),
2424
("deepseek-v4-flash", "pretrain", "GB200"): (4096, 256, 64),
25+
("deepseek-v4-flash", "checkpoint_resume", "GB200"): (4096, 256, 64),
2526
("deepseek-v4-flash", "sft", "GB200"): (1024, 128, 32),
2627
("deepseek-v4-flash", "peft", "GB200"): (1024, 128, 32),
2728
("deepseek-v4-flash", "sft_long_context", "GB200"): (1024, 128, 64),

0 commit comments

Comments
 (0)