[Tracking] DeepSeek-v4 HybridModel merge plan - #5795
Draft
hxbai wants to merge 1 commit into
Draft
Conversation
This was referenced Jul 21, 2026
FDecaYed
added a commit
to FDecaYed/Megatron-LM
that referenced
this pull request
Jul 21, 2026
Add configurable boundary-fill semantics and roll packed THD MTP inputs across contiguous context-parallel shards without crossing sequence boundaries. Reconstructed from the MTP portion of NVIDIA#5795 on top of the padded-cu-seqlens fix in NVIDIA#4495. Signed-off-by: Deyu Fu <Deyu.Foo@gmail.com>
FDecaYed
added a commit
to FDecaYed/Megatron-LM
that referenced
this pull request
Jul 21, 2026
Add the unfused compressed sparse attention algorithm, inert configuration fields, and focused algorithm coverage without enabling a model variant. Reconstructed from NVIDIA#4458 and its corrections as part of the frozen feature set in NVIDIA#5795. Signed-off-by: Deyu Fu <Deyu.Foo@gmail.com>
FDecaYed
added a commit
to FDecaYed/Megatron-LM
that referenced
this pull request
Jul 21, 2026
Enable SBHD-only DSv4 Hybrid attention orchestration, model-variant validation, backend-explicit specs, and MTP layer-ratio plumbing. Reconstructed from NVIDIA#4458, NVIDIA#4518, NVIDIA#5018, and NVIDIA#5526 as part of the frozen feature set in NVIDIA#5795. Signed-off-by: Deyu Fu <Deyu.Foo@gmail.com>
FDecaYed
added a commit
to FDecaYed/Megatron-LM
that referenced
this pull request
Jul 21, 2026
Map the canonical padded vocabulary size into TransformerConfig for hash routing and hide the redundant generated CLI field. Reconstructed from NVIDIA#4481 and the frozen feature set in NVIDIA#5795. Signed-off-by: Deyu Fu <Deyu.Foo@gmail.com>
Replace the historical aggregate with the frozen HybridModel-only feature oracle used to define the reviewable prerequisite and DSv4 slices. Exclude GPTModel support, dynamic context parallelism, SFT-specific packing, optimizer-state offload, and full-iteration CUDA graphs. Align the HybridEP padding flag with the current NVIDIA#5008 contract. Signed-off-by: Deyu Fu <deyuf@nvidia.com>
FDecaYed
force-pushed
the
codex/dsv4-main-port
branch
from
July 23, 2026 15:53
9596ade to
234919d
Compare
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Jul 23, 2026
This was referenced Jul 29, 2026
This was referenced Aug 10, 2026
This was referenced Aug 17, 2026
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.
DeepSeek-v4 HybridModel merge plan
Summary
This PR is the merge guide for the DSv4 feature set frozen at the current
development cutoff. The implementation has been reconstructed on frozen
mainbb5647a9bdd044af85ca323b1aef5ede02e96a37as reviewable functionalunits; historical PRs are behavioral provenance, not a commit sequence to
replay. This recut will not continuously refresh from
main.The final supported path is HybridModel only. This effort does not continuously
absorb later development-branch features.
Reusable prerequisites remain separate from the nine DSv4-specific children.
We will publish by dependency rounds: a child is opened only after its direct
bases merge, and is rebased onto current
mainso its GitHub diff containsonly that slice. We are not using stacked PRs for parallel review.
Existing external prerequisites
(current-CUDA-graph API follow-up: fix(mhc): update CUDA graph module API #5994)
PackedSeqParamsflatten/rebuild for TE CUDA graphsFresh reusable prerequisites
DSv4-specific series
Dependency order
Reusable prerequisite edges:
P1 -> P2 -> {P3, P4},P7 -> P8,{#5008, P4, P7} -> P10, and{#5672, P4, P8} -> P11.P9 depends on #4495. P4 and P10 are logically distinct features despite their
router-code dependency.
DSv4 edges:
{P1, P6} -> D1,{D1, P6} -> D2,D2 -> D3,{D2, P2} -> D4,{D3, P6} -> D5,{D2, D5} -> D6,D5 -> D7,{D6, D7, P9, P11} -> D8,and
{D4, D8, all recipe prerequisites} -> D9.The braces indicate work that may be reviewed in the same publication round
after its shared base has merged; they are not stacked review branches.
Detached work
The following work is independent of this frozen DSv4 merge and is linked for
provenance only:
Explicit non-goals
Original authors and contributors remain credited in each reconstructed PR
through links to the relevant source PRs.
Each published slice is recreated as one signed, signed-off commit on its
publication base. Round-0 links above are live; later links are added only
after their direct dependencies merge.