Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
args:
- '--disable=R0401,R0917,W0201,W0613'
- "--ignore-patterns='.pytype,.*pyi$'"
- '--ignore-paths=src/maxtext/input_pipeline/protos|src/maxtext/eval/simple_evals_template|src/maxtext/experimental/lineage'
- '--ignore-paths=src/maxtext/input_pipeline/protos|src/maxtext/eval/simple_evals_template|src/maxtext/experimental/lineage|src/maxtext/experimental/mpmd/jax|tests/unit/mpmd_test/(cp|deepseek_maxtext_parity|deepseek_model|ds_ep_aot|ds_ep_lineage_pipeline|ds_ep_lineage|ds_ep_qwen|ds_ep|exact_dsv3|gdn_kernels|gpu_kernels|gpu_port|maxtext_parity|multihost|pathways|profiling|qwen35_explicit|qwen35_maxtext_parity|qwen35_model|ragged_buffer|relay|schedule|sharding_mode|slices_layout|stage_ad|testing|transfer_channels|transfer|xprof_align|xprof_gpu|xprof_pb|xprof)_test.py'

# - repo: https://github.com/google/pytype
# rev: 2024.10.11
Expand Down
15 changes: 15 additions & 0 deletions src/maxtext/experimental/mpmd/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""MPMD (multiple program, multiple data) pipeline parallelism, experimental."""
327 changes: 327 additions & 0 deletions src/maxtext/experimental/mpmd/jax/README.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions src/maxtext/experimental/mpmd/jax/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Pure-JAX MPMD pipeline: one jitted program set per pipeline stage, driven from Python."""

import os
import sys

# A module of this package run by file path (`python3 src/maxtext/experimental/mpmd/jax/ds_ep_pipeline.py`), or a
# Python started in this directory, has this directory on sys.path, where the package's modules shadow top-level ones
# of the same name: xprof.py hides the `xprof` package, which `import tokamax` imports (tokamax 0.0.17). The
# package's modules import one another by their full names and need no such entry: take it off before any of them
# imports tokamax.
_here = globals().get("__file__") # a loader may set none (frozen, in-memory): it has no directory on sys.path then
if _here:
_here = os.path.dirname(os.path.realpath(_here))
sys.path[:] = [p for p in sys.path if not (isinstance(p, str) and os.path.realpath(p or os.curdir) == _here)]
del os, sys, _here
15 changes: 15 additions & 0 deletions src/maxtext/experimental/mpmd/jax/deepseek/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""A pure-JAX DeepSeek-V3 port: the layer math the MPMD pipeline's stage programs run."""
Loading
Loading