You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
- [x] I have updated the documentation
PiperOrigin-RevId: 950076344
Copy file name to clipboardExpand all lines: src/maxtext/configs/base.yml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -213,6 +213,8 @@ num_experts_per_tok: 1
213
213
megablox: true
214
214
sparse_matmul: true
215
215
capacity_factor: -1.0# a factor to decide expert capacity for token dropping, and no dropping by default
216
+
num_moe_token_chunks: 1# split routed-MoE tokens into N chunks (ring-of-experts path) so each chunk's EP all-gather / reduce-scatter overlaps the previous chunk's GMM compute. 1 = disabled (identical to baseline).
217
+
moe_chunk_barrier: false # wraps its iteration with optimization_barrier to chain the chunked ring-of-experts MoE loop so each chunk's input is fenced on the previous chunk's output, forcing sequential (no-interleave) chunk execution. Math unchanged (barrier is identity), loss bit-exact. Needs num_moe_token_chunks>1 + use_ring_of_experts=True to matter.
216
218
ragged_buffer_factor: -1.0# a factor to determine the size of the ragged buffer for routed MoE activations.
217
219
# By default (-1), the routed buffer is worst case size to ensure no dropping.
218
220
# When set to 1.0 this buffer if set to the size assuming perfectly balanced. If the routing dictates
0 commit comments