feat(deepseek-v4): add native LoRA construction and conversion bridge - #2772
Draft
zhoutong-hai wants to merge 2 commits into
Draft
feat(deepseek-v4): add native LoRA construction and conversion bridge#2772zhoutong-hai wants to merge 2 commits into
zhoutong-hai wants to merge 2 commits into
Conversation
zhoutong-hai
requested review from
Shi-Dong,
Zhichenzzz,
fzyzcjy,
maocheng23,
yueming-yuan and
yushengsu-thu
as code owners
August 26, 2026 23:37
zhoutong-hai
marked this pull request as draft
August 27, 2026 00:10
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.
Problem
Current Miles pins Megatron-Bridge at
7f0fb345, which does not registerDeepseekV4ForCausalLM. Letting Bridge select a provider therefore cannot construct the current native V4 graph. Treating it as V3 or using incomplete inferred mappings is worse: a strict current-main load exposed thousands of unmapped or missing checkpoint parameters.V4 also owns both a main-attention
wq_band a nested DSA indexerlinear_wq_b. The generic MLA alias maps barewq_bto the indexer, so an unqualified V4 treatment can wrap the wrong module.Finally, a V4 portable export is valid only as an adapter against the pinned native base. The conversion-only bridge cannot safely claim to emit a complete merged base, and a failed adapter conversion must not leave a success marker or strand peer ranks in a barrier.
Fix
wq_bcannot also match the nested indexer..completeonly after a valid adapter is present.This does not duplicate the MXFP4 ingestion work in #2717. It is scoped to current main and its pinned Bridge/native V4 graph. If the large Megatron bump in #2706 lands first, the mapping layer will need a focused rebase because that PR intentionally renames and relayouts the V4 graph. The general PEFT-export work in #2580 is related; this PR adds the V4 requirement that portable export cannot remain best-effort.
Validation
Remaining qualification
A successful adapter-only artifact still needs to be loaded back against the pinned base before portable export is called complete. This PR remains draft until that round trip is recorded and #2771 lands.