Support latest PyTorch RNG state API. - #8
Merged
Conversation
Contributor
|
LGTM. |
shjwudp
referenced
this pull request
in shjwudp/Megatron-LM
Apr 18, 2022
shjwudp
referenced
this pull request
in shjwudp/Megatron-LM
Jan 6, 2025
Merge #7 into branch and fix some bugs
dhia680
pushed a commit
to dhia680/Megatron-LM
that referenced
this pull request
Feb 10, 2025
Adding Llama3.2-1B config
liuzhenhai93
pushed a commit
to liuzhenhai93/Megatron-LM
that referenced
this pull request
Mar 11, 2025
…_chunk_poc Revert "Liuzhenhai xhs whole chunk 1f1b poc"
lyuwen
added a commit
to lyuwen/Megatron-LM
that referenced
this pull request
Sep 11, 2025
merge with upstream NVIDIA/Megatron-LM
shjwudp
referenced
this pull request
in shjwudp/Megatron-LM
Nov 12, 2025
copy-pr-bot Bot
pushed a commit
that referenced
this pull request
Dec 17, 2025
…dec17 Fix API Backward Compatibility ISSUE
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>
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
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 27, 2026
Fix the placeholder rollout crash.
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.
Fixes #7.