added missing valid-data line - #9
Merged
Merged
Conversation
thomasw21
pushed a commit
to thomasw21/Megatron-LM
that referenced
this pull request
Mar 20, 2023
haidark
pushed a commit
to haidark/Megatron-LM
that referenced
this pull request
Mar 8, 2024
Data processing patch
itlamp
pushed a commit
to itlamp/Megatron-LM-comms
that referenced
this pull request
Apr 7, 2025
* Update config.yml * Update config.yml --------- Co-authored-by: Lakshmisha Prabhu <lprabhu@habana.ai>
jiemingz
pushed a commit
to jiemingz/Megatron-LM
that referenced
this pull request
Jul 28, 2025
Signed-off-by: ashors1 <ashors@nvidia.com>
lyuwen
added a commit
to lyuwen/Megatron-LM
that referenced
this pull request
Sep 11, 2025
…xiv:2503.05139 (NVIDIA#9) * Add NormHead as descrived in arxiv:2503.05139 * Add Stochastic Routing Warmup introduced in arxiv:2503.05139
shjwudp
referenced
this pull request
in shjwudp/Megatron-LM
Nov 12, 2025
* Remove redundant logits calculations in gpt_model * Merge the linear-cross-entropy-fusion flag and the cross-entropy-fusion flag
shjwudp
referenced
this pull request
in shjwudp/Megatron-LM
Nov 21, 2025
* Remove redundant logits calculations in gpt_model * Merge the linear-cross-entropy-fusion flag and the cross-entropy-fusion flag
copy-pr-bot Bot
pushed a commit
that referenced
this pull request
Jan 6, 2026
handle fp8_tensor _data is None situation
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 19, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yueming Yuan <yym022502@gmail.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yueming Yuan <yym022502@gmail.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yueming Yuan <yym022502@gmail.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 26, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yueming Yuan <yym022502@gmail.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Feb 26, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yueming Yuan <yym022502@gmail.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Mar 2, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yueming Yuan <yym022502@gmail.com>
guapisolo
pushed a commit
to guapisolo/Megatron-LM
that referenced
this pull request
Mar 2, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yueming Yuan <yym022502@gmail.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
May 4, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
May 4, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
May 6, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
May 7, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
May 11, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
May 14, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
May 18, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yangbofun
pushed a commit
to xlm-research/Megatron-LM
that referenced
this pull request
May 22, 2026
byshiue
pushed a commit
to byshiue/Megatron-LM
that referenced
this pull request
May 29, 2026
Add THD (packed sequence) support for Qwen3.5-VL decoder
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
Jun 12, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
Jun 12, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Yan Xu <yxu1@nvidia.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
Jul 14, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Yan Xu <yxu1@nvidia.com>
lauradang
pushed a commit
to lauradang/Megatron-LM
that referenced
this pull request
Jul 29, 2026
Fix logging issues from failed rollouts
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
Aug 13, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Yan Xu <yxu1@nvidia.com>
Connor-XY
added a commit
to Connor-XY/Megatron-LM
that referenced
this pull request
Aug 17, 2026
Resolves all eleven comments on the PR thread: * Rename CheckpointManager → CheckpointWithoutOutputManager and update the docstring; the class strictly manages CheckpointWithoutOutput instances, so the new name avoids the broader "checkpoint" overloading. Updates all importers and tests. (#1) * Document why subtracting the per-row max in SinkhornKnopp.forward is benign — Sinkhorn's first row-normalization cancels any per-row scalar, so the shifted and unshifted exp produce the same fixed point and gradient. (NVIDIA#2) * Use NotImplementedError for the mhc + fine_grained_activation_offloading block — it's a known unimplemented interaction, not a config error. (NVIDIA#3) * Drop the new __call__ override and backward_dw_cudagraph from base TransformerLayer; the mHC kwarg extraction now lives on HyperConnectionTransformerLayer.__call__, with _mhc_recompute_manager initialized in __init__ so forward() reads it directly without a getattr fallback. cuda_graphs.py reads is_decode_only() directly, so dropping the dynamic_inference_decode_only injection is safe. (NVIDIA#4, NVIDIA#5, NVIDIA#10) * Rename the FineGrainedActivationOffloadingInterface alias off_interface → offload_interface in transformer_layer.py for clarity. (NVIDIA#6) * Extract a _run_mlp helper on TransformerLayer that owns the MLP-call branching (recompute / chunked-prefill / fp8-fp4 / plain-mlp); both base and HC _forward_mlp call it, eliminating the previous ~80-line duplication. The MoE-cudagraph early-return remains in base _forward_mlp after the helper call (HC is guarded against MoE). (NVIDIA#8) * Raise NotImplementedError at HyperConnectionTransformerLayer.__init__ when is_moe_layer is True and point users at HyperConnectionHybridLayer; drop the dead MoE branch in _get_submodules_under_cudagraphs. (NVIDIA#9) * No code change for the MoE composition / extensibility comment (NVIDIA#7) — see the PR thread reply for the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Yan Xu <yxu1@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.