Skip to content

Commit 50c1ffb

Browse files
committed
fix(perf): select supported DPA recipe for DeepSeek proxy
Signed-off-by: Malay Nagda <malayn@nvidia.com>
1 parent 6fc4ef9 commit 50c1ffb

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/megatron/bridge/perf_recipes/deepseek/gb300/deepseek_v3.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ def deepseek_v3_pretrain_8gpu_gb300_nvfp4_config() -> ConfigContainer:
284284
"NVTE_ALLOW_NONDETERMINISTIC_ALGO": 0,
285285
# NVFP4 fast-math path.
286286
"NVTE_USE_FAST_MATH": 1,
287+
# Use a supported FP8 attention recipe under the NVFP4 linear-layer recipe.
288+
"NVTE_DPA_FP8_RECIPE": "Float8CurrentScaling",
287289
"NVTE_CUTEDSL_FUSED_GROUPED_MLP": 1,
288290
}
289291
return cfg

tests/unit_tests/recipes/test_r050_perf_recipe_ports.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ def test_deepseek_v3_8gpu_gb300_nvfp4_proxy_has_valid_topology() -> None:
161161
assert cfg.env_vars["NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN"] == 4
162162

163163

164+
def test_deepseek_v3_8gpu_gb300_nvfp4_uses_fp8_current_scaling_for_dpa() -> None:
165+
cfg = deepseek_v3_pretrain_8gpu_gb300_nvfp4_config()
166+
167+
assert cfg.mixed_precision.fp8_dot_product_attention is True
168+
assert cfg.env_vars["NVTE_DPA_FP8_RECIPE"] == "Float8CurrentScaling"
169+
170+
164171
def test_deepseek_v3_b300_mxfp8_preserves_r050_hybridep_settings() -> None:
165172
cfg = deepseek_v3_pretrain_256gpu_b300_fp8mx_config()
166173

0 commit comments

Comments
 (0)