Fix DeepSeek related bugs (#724, #548, #633)#731
Open
Nyquist24 wants to merge 1 commit intoalibaba:mainfrom
Open
Fix DeepSeek related bugs (#724, #548, #633)#731Nyquist24 wants to merge 1 commit intoalibaba:mainfrom
Nyquist24 wants to merge 1 commit intoalibaba:mainfrom
Conversation
- Fix alibaba#724: Remove undefined function `get_gpt_decoder_layer_specs` call in pretrain_deepseek.py, reuse already-computed `transformer_layer_spec` - Fix alibaba#548: Remove non-functional flash_attn option in deepseek_v2 since MLA does not support flash attention, always use TE Fused Attention - Fix alibaba#633: Replace unsafe `str.replace` with `re.sub(count=1)` in hf2mcore_deepseek_v2_moe.py to prevent substring mismatch during local_experts key renaming
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.
get_gpt_decoder_layer_specscall in pretrain_deepseek.py, reuse already-computedtransformer_layer_specstr.replacewithre.sub(count=1)in hf2mcore_deepseek_v2_moe.py to prevent substring mismatch during local_experts key renamingChanges
examples/deepseek_v3/pretrain_deepseek.pyexamples/deepseek_v2/run_mcore_deepseek.shNVTE_FUSED_ATTN=1toolkits/.../hf2mcore_deepseek_v2_moe.pystr.replace→re.sub(..., count=1)Test plan
--mtp-num-layersruns withoutNameErrorlocal_expertskeys