support deepseek-v4-flash-vision-exp megatron-swift - #191
Open
z0o0ey wants to merge 7 commits into
Open
Conversation
hjh0119
reviewed
Sep 14, 2026
Comment on lines
+249
to
+254
| # DSpark MTP | ||
| dspark_enabled: bool = False | ||
| dspark_block_size: int = 0 | ||
| dspark_noise_token_id: int = 0 | ||
| dspark_target_layer_ids: Optional[List[int]] = None | ||
| dspark_markov_rank: int = 256 |
| if needs_split: | ||
| input_ids = split_cp_inputs(input_ids, getattr(packed_seq_params, 'cu_seqlens_q', None), dim=1) | ||
| if self.visual is not None and not self.config.language_model_only and input_ids is not None: | ||
| input_ids = self.visual.mask_input_ids(input_ids) |
Contributor
Author
There was a problem hiding this comment.
这个分支只影响DeepSeek-V4多模态模型,目前只有DeepSeek-V4-Flash-Vision-exp模型
Comment on lines
+251
to
+252
| dspark_block_size: int = 0 | ||
| dspark_noise_token_id: int = 0 |
| if not self._dspark_target_hidden_states: | ||
| return | ||
| if self.config.enable_hyper_connections: | ||
| from megatron.core.transformer.hyper_connection import learned_output_contract |
Collaborator
There was a problem hiding this comment.
try catch, 提示升级megatron版本
This reverts commit 0d3cc20.
Contributor
Author
|
需要实现dspark,不然vision模型的mtp层会完全随机,无法正常工作 |
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.
No description provided.