Skip to content

Add chunked MoE support to MaxText.#4481

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_938756606
Open

Add chunked MoE support to MaxText.#4481
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_938756606

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Add chunked MoE support to MaxText.
It introduces the num_moe_token_chunks configuration to allow chunking of the MoE layer.
Also includes equiv_chunk_test.py to verify that chunked MoE produces equivalent results to the unchunked implementation.

  • I have tested these changes
  • I have updated the documentation

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/layers/moe.py 81.08% 4 Missing and 3 partials ⚠️
src/maxtext/kernels/ragged/ragged_gather.py 66.66% 0 Missing and 1 partial ⚠️
src/maxtext/kernels/ragged/ragged_gather_reduce.py 66.66% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@copybara-service copybara-service Bot force-pushed the test_938756606 branch 2 times, most recently from 7023902 to 4617f0a Compare July 15, 2026 19:37
It introduces the `num_moe_token_chunks` configuration to allow chunking of the MoE layer.
Also includes `equiv_chunk_test.py` to verify that chunked MoE produces equivalent results to the unchunked implementation.

- [x] I have tested these changes
- [ ] I have updated the documentation

PiperOrigin-RevId: 938756606
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant