@@ -161,6 +161,47 @@ def deepseek_v3_pretrain_64gpu_gb300_fp8mx_fsdp_config() -> ConfigContainer:
161161 return cfg
162162
163163
164+ def deepseek_v3_pretrain_128gpu_gb300_fp8mx_hsdp_config () -> ConfigContainer :
165+ """DeepSeek V3 pretrain: 128× GB300, MXFP8, Megatron Hybrid FSDP (HSDP)."""
166+ cfg = deepseek_v3_pretrain_config ()
167+ cfg .mixed_precision = _perf_precision ("fp8_mx" )
168+ cfg .model .fp8_output_proj = True
169+ _apply_deepseek_v3_64gpu_gb300_fsdp_configs (cfg )
170+
171+ cfg .model .expert_model_parallel_size = 32
172+ cfg .train .micro_batch_size = 1
173+
174+ cfg .ddp .outer_dp_sharding_strategy = "optim"
175+ cfg .ddp .num_distributed_optimizer_instances = 4
176+
177+ cfg .model .fp8_param_gather = True
178+ cfg .model .fp8_param = True
179+ cfg .model .moe_router_dtype = "bf16"
180+
181+ # Full-iteration CUDA graph with dropless MoE padding + paged stashing.
182+ cfg .model .cuda_graph_impl = "full_iteration"
183+ cfg .model .overlap_dispatch_backward_with_experts_wgrad = False
184+ cfg .ddp .megatron_fsdp_cuda_graph_mode = True
185+ cfg .ddp .fsdp_all_gather_in_start_param_sync = False
186+
187+ cfg .rng .te_rng_tracker = cfg .model .use_te_rng_tracker = True
188+ cfg .model .moe_pad_experts_for_cuda_graph_inference = True
189+ cfg .model .moe_paged_stash = True
190+ cfg .model .moe_expert_rank_capacity_factor = 1.5
191+ cfg .model .moe_paged_stash_buffer_size_factor_cuda = 1.2
192+ cfg .model .moe_paged_stash_buffer_size_factor_cpu = 1.0
193+ cfg .model .fine_grained_offloading_max_inflight_offloads = 1
194+
195+ # CuTeDSL fused grouped MLP (moe_a2a_overlap disabled).
196+ cfg .model .use_transformer_engine_op_fuser = True
197+ cfg .model .moe_mlp_glu_interleave_size = 32
198+
199+ cfg .mixed_precision .fp8_dot_product_attention = False
200+
201+ cfg .model .moe_router_force_load_balancing = True
202+ return cfg
203+
204+
164205def deepseek_v3_pretrain_256gpu_gb300_fp8mx_large_scale_config () -> ConfigContainer :
165206 """DeepSeek V3 pretrain: 256× GB300, MXFP8, large-scale proxy (BF16_V1 layout, GBS=256)."""
166207 cfg = deepseek_v3_pretrain_256gpu_gb300_bf16_config ()
0 commit comments