Skip to content

feat(model): add DeepSeek-V4.1 Flash support - #6199

Open
HollowMan6 wants to merge 4 commits into
NVIDIA-NeMo:mainfrom
HollowMan6:deepseekv41flash
Open

HollowMan6 wants to merge 4 commits into
NVIDIA-NeMo:mainfrom
HollowMan6:deepseekv41flash

Conversation

@HollowMan6

@HollowMan6 HollowMan6 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Depend and based on the actual split PRs behind (Pinned and patched with https://github.com/HollowMan6/Megatron-LM/tree/dsv41-main-dspark)

Add Megatron-Bridge support for loading and exporting the released DeepSeek-V4.1-Flash checkpoint with the native Megatron-Core V4.1 model.

Changelog

  • Register DeepSeekV41Bridge and DeepSeekV41ModelProvider.
  • Add native provider construction and configuration round-tripping for DeepSeekV41Model.
  • Add HF-to-MCore and MCore-to-HF mappings for:
    • attention and MoE physical layers
    • HyperConnections
    • vision and aligner modules
    • Engram tables
    • DSpark draft modules
  • Decode the checkpoint's block-32 FP8 weights and packed MXFP4 expert weights during import.
  • Restore the released FP8 and packed MXFP4 layouts during export.
  • Stream Engram rows directly from SafeTensors, including uneven EP ownership and TP broadcasts, without materializing the full table.
  • Add unit coverage for mapping registration, quantized weight conversion, Engram row streaming, replicated buffers, and export conversion.

GitHub Actions CI

See the CI section in the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

@copy-pr-bot

copy-pr-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cuichenx cuichenx added the blocked Work cannot move forward until an external dependency is cleared label Oct 10, 2026
Signed-off-by: Hollow Man <hollowman@opensuse.org>
Signed-off-by: Hollow Man <hollowman@opensuse.org>
Signed-off-by: Hollow Man <hollowman@opensuse.org>
Allow LoRA to promote explicitly targeted bare 2-D parameters using the
existing target_modules matcher.

This supports replicated DSV4 grouped output projections without adding a
model-specific parameter name check or a new configuration field. The original
parameter object is preserved as the wrapped linear weight, while unrelated
parameters and non-LoRA checkpoint layouts remain unchanged.

Also add mapping fallbacks for promoted `.to_wrap.weight` names and regression
coverage for parameter-backed LoRA targets.

Signed-off-by: Hollow Man <hollowman@opensuse.org>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:model Model implementations and HF bridge logic blocked Work cannot move forward until an external dependency is cleared community-request feature New capabilities, enhancements, or enablement work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants