Repository navigation
feat(compile): support DeepSeek V4.1 packed static graph training - #1434
Merged
github-actions[bot] merged 1 commit intoNov 5, 2026
Merged
Conversation
honghaowang25
requested review from
kisnwangg,
liuchongming74,
suteng,
yangzhenzhang02,
yaoyifanx and
yu-chen-code
as code owners
November 3, 2026 02:52
honghaowang25
force-pushed
the
packing_v41
branch
3 times, most recently
from
November 3, 2026 07:25
68334fc to
9f8b840
Compare
Contributor
Author
|
/retest |
Contributor
Author
|
/check-pr |
|
Gate trigger failed: please fix the /check-pr findings and obtain the |
Contributor
Author
|
/retest |
|
honghaowang25
force-pushed
the
packing_v41
branch
from
November 3, 2026 08:13
9f8b840 to
a508ba9
Compare
Contributor
Author
|
/retest |
|
honghaowang25
force-pushed
the
packing_v41
branch
2 times, most recently
from
November 3, 2026 10:51
1ead536 to
05a125c
Compare
|
|
@honghaowang25, your gate pipeline failed at the code check stage. You can configure some code check tools locally following the (pre-push quick guide), to enable automatic checking when you push your code every time. Tools included are: Check_CMakelint, Check_Codespell, Check_Cpplint, Check_Lizard, Check_Pylint, Check_ClangFormat, Check_ShellCheck. |
honghaowang25
force-pushed
the
packing_v41
branch
from
November 5, 2026 01:39
434b68c to
862fa84
Compare
Contributor
Author
|
/retest |
honghaowang25
force-pushed
the
packing_v41
branch
from
November 5, 2026 03:33
862fa84 to
d6239d0
Compare
Prepare packing tensor inputs only at the graph boundary. Register a graph-specific pytree type while preserving ordinary eager FSDP input objects, boundaries and compression caches. Expose router metrics through a unified Tensor getter and retain the external-resource WikiText launcher. Emit router metrics through shared postforward, with writers detaching aux losses at the source so the getter stays a pure on-device mean. Dispatch the micro-step-end lifecycle through BaseTrainer and TextTrainer wrappers, with an explicit loss mapping in the callback contract. Logging averages reporting microbatches while trainer loss mappings retain generic summation. Cover the getter's scalar-free contract plus lifecycle dispatch order and failed microsteps.
honghaowang25
force-pushed
the
packing_v41
branch
from
November 5, 2026 03:36
d6239d0 to
533ec39
Compare
Contributor
Author
|
/retest |
|
|
yangzhenzhang02
approved these changes
Nov 5, 2026
kisnwangg
approved these changes
Nov 5, 2026
yu-chen-code
approved these changes
Nov 5, 2026
yaoyifanx
approved these changes
Nov 5, 2026
github-actions
Bot
merged commit Nov 5, 2026
7b1ea07
into
mindspore-ai:master
10 of 14 checks passed
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.
Prepare packed metadata before graph capture and replay document tensors independently of compression. Preserve standard WikiText loading and expose router metrics as graph outputs.
Validate 40-layer debug FP32 FSDP2 training for 30 steps with dynamic shapes, packing enabled, and Compressor/Indexer disabled.
What type of PR is this?
/kind feature
What does this PR do / why do we need it:
Enable DeepSeek V4.1 packing-only text training through HyperParallel's standard WikiText data pipeline and joint-graph compiler.
Packed document boundaries and document counts vary between batches. Reading real boundary values during capture, or treating document-dependent Python metadata as constants, prevents correct graph capture and replay. Router metrics also need explicit graph outputs because replay does not update Python module attributes.
This PR:
last_mean_aux_lossgetter in eager and graph modes, returns router metrics throughloss_dict, and converts them to Python floats in the graph-external logging callback.Validation:
dynamic=truefor the graph run.Scope: CP=TP=EP=1; Compressor, Indexer, candidate pool, and Indexer KL are disabled. Compression ratios must be configured in the external model config to match its layer count. These results establish functional execution, not full-model eager/graph FSDP numerical parity or fused DSA performance.
Which issue(s) this PR fixes:
Fixes #1437
Code review checklist [illustration]: