[Community][Main] feat(moe): Adding context parallel support to eager attention implementation - #2295
Draft
yuzhongw-nvidia wants to merge 154 commits into
Draft
[Community][Main] feat(moe): Adding context parallel support to eager attention implementation#2295yuzhongw-nvidia wants to merge 154 commits into
yuzhongw-nvidia wants to merge 154 commits into
Conversation
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
…o separate channel
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
…imizer Co-authored-by: Zijie Yan <zijiey@nvidia.com> Co-authored-by: Hao Wu <skyw@nvidia.com> Co-authored-by: oliver könig <okoenig@nvidia.com> Co-authored-by: Boxiang Wang <boxiangw@nvidia.com> Co-authored-by: mikail <mkhona@nvidia.com>
Co-authored-by: Santosh Bhavani <santosh.bhavani@live.com>
Co-authored-by: Mcore Bot <mcore-bot@nvidia.com>
…ilures Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
…or MOE Co-authored-by: Zhongbo Zhu <zhongboz@nvidia.com>
…ction missing initialization
Signed-off-by: oliver könig <okoenig@nvidia.com>
…sing dsv3 tokenizer after !3646; Have datasets account for tokenizers which incorrectly define PAD; Co-authored-by: Teodor-Dumitru Ene <tene@nvidia.com>
…dless of cuda_graph_impl (NVIDIA#2166) Signed-off-by: Chen Cui <chcui@nvidia.com>
…ing same module (NVIDIA#2123) Signed-off-by: Hongbin Liu <hongbinl@nvidia.com>
fix pipeline
Signed-off-by: oliver könig <okoenig@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
…e with explicit group parameters (NVIDIA#2152) Signed-off-by: dimapihtar <dpihtar@gmail.com> Co-authored-by: dimapihtar <dpihtar@gmail.com>
Signed-off-by: Li Tao <lit@nvidia.com> Signed-off-by: lit <lit@nvidia.com>
…ise). (NVIDIA#2087) Signed-off-by: kunlunl <kunlunl@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: Xin Yao <xiny@nvidia.com>
…lel state with explicit group parameters (NVIDIA#2152)" This reverts commit 56019e6.
…lel state with explicit group parameters (NVIDIA#2152) + fix: m4 _clean_metadata_for_serialization for training (NVIDIA#2225) Signed-off-by: dimapihtar <dpihtar@gmail.com> Co-authored-by: dimapihtar <dpihtar@gmail.com>
Signed-off-by: Boxiang Wang <boxiangw@nvidia.com>
Signed-off-by: Boxiang Wang <boxiangw@nvidia.com>
Signed-off-by: Boxiang Wang <boxiangw@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com> Signed-off-by: GitHub Actions <github-actions[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Signed-off-by: dimapihtar <dpihtar@gmail.com> Signed-off-by: oliver könig <okoenig@nvidia.com> Signed-off-by: Asha Anoosheh <aanoosheh@nvidia.com> Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com> Signed-off-by: Evgeny <etsykunov@nvidia.com> Signed-off-by: root <Evgeny> Co-authored-by: Teodor-Dumitru Ene <34819528+tdene@users.noreply.github.com> Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com> Co-authored-by: Asha Anoosheh <aanoosheh@nvidia.com> Co-authored-by: Keshav Santhanam <ksanthanam@nvidia.com> Co-authored-by: Teodor-Dumitru Ene <tene@nvidia.com> Co-authored-by: Robert Kirby <ArEsKay3@users.noreply.github.com> Co-authored-by: Lawrence McAfee <85179052+lmcafee-nvidia@users.noreply.github.com> Co-authored-by: Robert Kirby <rkirby@nvidia.com> Co-authored-by: Mcore Bot <mcore-bot@nvidia.com> Co-authored-by: helen ngo <helenn@nvidia.com> Co-authored-by: Evgeny Tsykunov <e.tsykunov@gmail.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Boxiang Wang <boxiangw@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: dimapihtar <dpihtar@gmail.com> Signed-off-by: oliver könig <okoenig@nvidia.com> Signed-off-by: Asha Anoosheh <aanoosheh@nvidia.com> Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com> Signed-off-by: Evgeny <etsykunov@nvidia.com> Signed-off-by: root <Evgeny> Co-authored-by: Teodor-Dumitru Ene <34819528+tdene@users.noreply.github.com> Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com> Co-authored-by: Asha Anoosheh <aanoosheh@nvidia.com> Co-authored-by: Keshav Santhanam <ksanthanam@nvidia.com> Co-authored-by: Teodor-Dumitru Ene <tene@nvidia.com> Co-authored-by: Robert Kirby <ArEsKay3@users.noreply.github.com> Co-authored-by: Lawrence McAfee <85179052+lmcafee-nvidia@users.noreply.github.com> Co-authored-by: Robert Kirby <rkirby@nvidia.com> Co-authored-by: Mcore Bot <mcore-bot@nvidia.com> Co-authored-by: helen ngo <helenn@nvidia.com> Co-authored-by: Evgeny Tsykunov <e.tsykunov@gmail.com>
Signed-off-by: Boxiang Wang <boxiangw@nvidia.com>
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.
What does this PR do ?
Sometimes, certain attention and mask implementations are difficult to write a fused / optimized implementation in a short period of time. However, we still need to run experiments to verify their effectiveness.
At such times, we need to fallback to the eager mode. Therefore, I added a switch to fallback to the eager implementation of attention:
Additionally, since Megatron Core's eager attention does not support context parallelism, I provided a distributed attention implementation similar to that described in the Llama 3 paper.
PR to dev
Contribution process
flowchart LR A[Pre-checks] --> B[PR Tests] subgraph Code Review/Approval C1[Expert Review] --> C2[Final Review] end B --> C1 C2 --> D[Merge]Pre-checks
Core 0.8)Code review
The following process is enforced via the CODEOWNERS file for changes into
megatron/core. For changes outside ofmegatron/core, it is up to the PR author whether or not to tag the Final Reviewer team.For MRs into `main` branch
(Step 1): Add PR label
Expert Review(Step 2): Collect the expert reviewers reviews
Expert Reviewlabel when your PR is ready for review.Final Review might get declined if these requirements are not fulfilled.
(Step 3): Final Review
Final Reviewlabel(Optional Step 4): Cherry-pick into release branch
If this PR also needs to be merged into
core_r*release branches, after this PR has been merged, selectCherry-pickto open a new PR into the release branch.For MRs into `dev` branch
The proposed review process for `dev` branch is under active discussion.MRs are mergable after one approval by either
eharper@nvidia.comorzijiey@nvidia.com.Merging your PR
Any member of core-adlr and
core-nemowill be able to merge your PR.