-
Notifications
You must be signed in to change notification settings - Fork 247
Context parallelism for Megatron core models #818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
1ba0d5f
implement TEDotProductAttentionCP context manager for megatron CP TTT…
yeyu-nvidia e0062b2
debug: rotary_seq_len in EagleModule forward need to multiply with cp…
yeyu-nvidia 39e2ec6
debug: revert previous change
yeyu-nvidia 739ebff
debug: eagle inputs need gather and scatter for cp
yeyu-nvidia 751eef8
debug: update GPTModel path
yeyu-nvidia b8f74c9
debug: RotaryEmbedding's output is already scattered to context paral…
yeyu-nvidia faa8822
debug
yeyu-nvidia 1999c37
revert
yeyu-nvidia c7b1853
debug: megatron doesn't have gather_from_context_parallel_region; use…
yeyu-nvidia fe86792
debug: gather_from_sequence_parallel_region gathers from the first di…
yeyu-nvidia 5215713
attention_mask needs to convert to 0/-inf for attention_bias
yeyu-nvidia 92d772e
debug: when CP is enabled, we need to switch to causal mask for eagle
yeyu-nvidia efa3897
make attention_bias the same dtype as query
yeyu-nvidia 3ac3125
fix the bug; runnable
yeyu-nvidia 19e77fd
remove unnecessary code
yeyu-nvidia cc88044
fix: HF main needs trust_remote_code=True for resuming ckpt
yeyu-nvidia 2fb7a57
update changelog
yeyu-nvidia 8234c68
formatting
yeyu-nvidia a2e2489
debug: fix the sharded state dict issue
yeyu-nvidia f7ce0c3
debug
yeyu-nvidia b36807a
remove attn mask expansion as it is unnecessary and will cause error …
yeyu-nvidia 8bfd98b
formatting
yeyu-nvidia 4c44c1c
remove te_dot_product_attention_with_cp from pseudo_speculative_gener…
yeyu-nvidia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 121
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 1068
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 431
🏁 Script executed:
# Look at the overall structure of the file to understand the context wc -l examples/speculative_decoding/main.py head -n 50 examples/speculative_decoding/main.pyRepository: NVIDIA/Model-Optimizer
Length of output: 2045
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 2794
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 373
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 987
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 706
Gate
trust_remote_codebehind an explicit flag.Lines 165, 167, 173, and 186 all hardcode
trust_remote_code=Truefor model/tokenizer/config loading, which automatically executes remote code if the checkpoint points to an untrusted repository. Add atrust_remote_code: bool = Falsefield to theTrainingArgumentsdataclass and usetraining_args.trust_remote_codein all four locations.Affected locations
🤖 Prompt for AI Agents