[JAX] Optimize MoE block - #3354
Open
jberchtold-nvidia wants to merge 48 commits into
Open
Conversation
…mm-custom-partition-rules
Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
…mm-custom-partition-rules # Conflicts: # qa/L1_jax_distributed_unittest/test.sh
for more information, see https://pre-commit.ci
This reverts commit 1b783b9.
This reverts commit 294a8ec.
jberchtold-nvidia
marked this pull request as draft
August 12, 2026 14:47
Contributor
Greptile SummaryThe PR optimizes the JAX expert-parallel MoE block by adding grouped MXFP8 quantization, configurable receive capacity, and a contiguous FC1 kernel layout.
Confidence Score: 4/5The PR is not yet safe to merge because legacy Current HEAD still replaces Files Needing Attention: transformer_engine/jax/flax/moe.py Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Flax _MoEBlock] --> B[Gate and top-k routing]
B --> C[EP dispatch]
C --> D[Grouped FC1 quantize and GEMM]
D --> E[SwiGLU]
E --> F[Grouped FC2 quantize and GEMM]
F --> G[EP combine]
H[Receive capacity] --> C
I[FC1 and FC2 quantizer sets] --> D
I --> F
Reviews (2): Last reviewed commit: "[pre-commit.ci] auto fixes from pre-comm..." | Re-trigger Greptile |
jberchtold-nvidia
force-pushed
the
jberchtold/moeblock-debug
branch
from
August 12, 2026 16:18
9dd563e to
1c98135
Compare
jberchtold-nvidia
force-pushed
the
jberchtold/moeblock-debug
branch
from
August 12, 2026 21:41
b8f3816 to
da9ad94
Compare
jberchtold-nvidia
force-pushed
the
jberchtold/moeblock-debug
branch
from
August 13, 2026 15:31
8d5d1b8 to
0dbf8a5
Compare
jberchtold-nvidia
force-pushed
the
jberchtold/moeblock-debug
branch
from
August 13, 2026 15:49
072422b to
0645751
Compare
Collaborator
Author
|
/te-ci L1 jax |
jberchtold-nvidia
force-pushed
the
jberchtold/moeblock-debug
branch
from
August 13, 2026 23:47
d9fa28c to
bc28b24
Compare
Collaborator
Author
|
/te-ci L1 jax |
jberchtold-nvidia
force-pushed
the
jberchtold/moeblock-debug
branch
from
August 14, 2026 14:13
ca32c8d to
ec09e5a
Compare
Collaborator
Author
|
/te-ci L1 jax |
for more information, see https://pre-commit.ci
jberchtold-nvidia
marked this pull request as ready for review
August 14, 2026 17:55
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.
Description
Improves performance of the MoE block by exposing support for quantization, removal of unnecessary masking overheads, and support for less memory usage via a reduced receive capacity in TE EP
Type of change
Changes
jnp.wheremasking that wasn't required as TE EP and grouped GEMM are group-awareChecklist: