Skip to content

Commit 8434e35

Browse files
Merge pull request #3044 from AI-Hypercomputer:mohit/move_configs
PiperOrigin-RevId: 867740632
2 parents fb04bc7 + b6cfc15 commit 8434e35

321 files changed

Lines changed: 1687 additions & 1477 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/run_jupyter_notebooks.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ jobs:
9090
PYTHONPATH: "${{ github.workspace }}/src"
9191
HF_TOKEN: ${{ secrets.HF_TOKEN }}
9292
run: |
93-
MAXTEXT_REPO_ROOT=$(pwd)
94-
MAXTEXT_NOTEBOOKS_ROOT="$MAXTEXT_REPO_ROOT/src/maxtext/examples"
93+
source .venv/bin/activate
94+
95+
export MAXTEXT_REPO_ROOT=$(pwd)
96+
export MAXTEXT_PKG_DIR=$(pwd)/src/maxtext
97+
export MAXTEXT_NOTEBOOKS_ROOT="$MAXTEXT_REPO_ROOT/src/maxtext/examples"
9598
9699
for notebook in "$MAXTEXT_NOTEBOOKS_ROOT"/{sft,rl}*.ipynb; do
97100
filename=$(basename "$notebook")
@@ -101,7 +104,7 @@ jobs:
101104
echo "Running $filename ..."
102105
echo "------------------------------------------------------"
103106
104-
.venv/bin/papermill "$notebook" "$output_name" -k maxtext_venv
107+
papermill "$notebook" "$output_name" -k maxtext_venv
105108
done
106109
- name: Record Commit IDs
107110
shell: bash

.github/workflows/run_pathways_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
export MAXTEXT_REPO_ROOT=$(pwd)
101101
export MAXTEXT_ASSETS_ROOT=$(pwd)/src/maxtext/assets
102102
export MAXTEXT_TEST_ASSETS_ROOT=$(pwd)/tests/assets
103-
export MAXTEXT_PKG_DIR=$(pwd)/src/MaxText
103+
export MAXTEXT_PKG_DIR=$(pwd)/src/maxtext
104104
# TODO(b/454659463): Enable test_default_hlo_match after volume mount is supported.
105105
.venv/bin/python3 -m pytest ${{ inputs.pytest_addopts }} -v -m "${FINAL_PYTEST_MARKER}" -k "not AotHloIdenticalTest and not CompileThenLoad" --durations=0
106106
env:

.github/workflows/run_tests_against_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
export MAXTEXT_REPO_ROOT=$(pwd)
111111
export MAXTEXT_ASSETS_ROOT=$(pwd)/src/maxtext/assets
112112
export MAXTEXT_TEST_ASSETS_ROOT=$(pwd)/tests/assets
113-
export MAXTEXT_PKG_DIR=$(pwd)/src/MaxText
113+
export MAXTEXT_PKG_DIR=$(pwd)/src/maxtext
114114
# omit this libtpu init args for gpu tests
115115
if [ "${{ inputs.device_type }}" != "cuda12" ]; then
116116
export LIBTPU_INIT_ARGS='--xla_tpu_scoped_vmem_limit_kib=65536'

.vscode/launch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"justMyCode": false,
1010
"python": "python3",
1111
"module": "maxtext.decode",
12-
"args": ["src/MaxText/configs/base.yml",
12+
"args": ["src/maxtext/configs/base.yml",
1313
"run_name=runner_$(date +%Y-%m-%d-%H-%M)",
1414
"base_output_directory=gs://test-maxtext-output",
1515
"dataset_path=gs://test-maxtext-dataset",
@@ -36,7 +36,7 @@
3636
"justMyCode": false,
3737
"python": "python3",
3838
"module": "maxtext.decode",
39-
"args": ["src/MaxText/configs/base.yml",
39+
"args": ["src/maxtext/configs/base.yml",
4040
"run_name=runner_$(date +%Y-%m-%d-%H-%M)",
4141
"base_output_directory=gs://test-maxtext-output",
4242
"dataset_path=gs://test-maxtext-dataset",
@@ -52,7 +52,7 @@
5252
"justMyCode": false,
5353
"python": "python3",
5454
"module": "MaxText.train",
55-
"args": ["src/MaxText/configs/base.yml",
55+
"args": ["src/maxtext/configs/base.yml",
5656
"run_name=runner_$(date +%Y-%m-%d-%H-%M)",
5757
"base_output_directory=gs://test-maxtext-output",
5858
"dataset_path=gs://test-maxtext-dataset",
@@ -68,7 +68,7 @@
6868
"python": "python3",
6969
"module": "maxtext.inference.inference_microbenchmark",
7070
"args": [
71-
"src/MaxText/configs/base.yml",
71+
"src/maxtext/configs/base.yml",
7272
"model_name=llama2-7b",
7373
"tokenizer_path=src/maxtext/assets/tokenizers/tokenizer.llama2",
7474
"weight_dtype=bfloat16",

PREFLIGHT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Before you run ML workload on Multihost with GCE or GKE, simply apply `bash pref
77

88
Here is an example for GCE:
99
```
10-
bash preflight.sh PLATFORM=GCE && python3 -m MaxText.train src/MaxText/configs/base.yml run_name=$YOUR_JOB_NAME
10+
bash preflight.sh PLATFORM=GCE && python3 -m MaxText.train src/maxtext/configs/base.yml run_name=$YOUR_JOB_NAME
1111
```
1212

1313
Here is an example for GKE:
1414
```
15-
bash preflight.sh PLATFORM=GKE && python3 -m MaxText.train src/MaxText/configs/base.yml run_name=$YOUR_JOB_NAME
15+
bash preflight.sh PLATFORM=GKE && python3 -m MaxText.train src/maxtext/configs/base.yml run_name=$YOUR_JOB_NAME
1616
```
1717

1818
# Optimization 2: Numa binding (You can only apply this to v4 and v5p)
@@ -22,14 +22,14 @@ For GCE,
2222
[preflight.sh](https://github.com/google/maxtext/blob/main/preflight.sh) will help you install `numactl` dependency, so you can use it directly, here is an example:
2323

2424
```
25-
bash preflight.sh PLATFORM=GCE && numactl --membind 0 --cpunodebind=0 python3 -m MaxText.train src/MaxText/configs/base.yml run_name=$YOUR_JOB_NAME
25+
bash preflight.sh PLATFORM=GCE && numactl --membind 0 --cpunodebind=0 python3 -m MaxText.train src/maxtext/configs/base.yml run_name=$YOUR_JOB_NAME
2626
```
2727

2828
For GKE,
2929
`numactl` should be built into your docker image from [maxtext_tpu_dependencies.Dockerfile](https://github.com/google/maxtext/blob/main/dependencies/dockerfiles/maxtext_tpu_dependencies.Dockerfile), so you can use it directly if you built the maxtext docker image. Here is an example
3030

3131
```
32-
bash preflight.sh PLATFORM=GKE && numactl --membind 0 --cpunodebind=0 python3 -m MaxText.train src/MaxText/configs/base.yml run_name=$YOUR_JOB_NAME
32+
bash preflight.sh PLATFORM=GKE && numactl --membind 0 --cpunodebind=0 python3 -m MaxText.train src/maxtext/configs/base.yml run_name=$YOUR_JOB_NAME
3333
```
3434

3535
1. `numactl`: This is the command-line tool used for controlling NUMA policy for processes or shared memory. It's particularly useful on multi-socket systems where memory locality can impact performance.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ See our guide on running MaxText in decoupled mode, without any GCP dependencies
4242
## 🔥 Latest news 🔥
4343

4444
* \[December 22, 2025\] [Muon optimizer](https://kellerjordan.github.io/posts/muon) is now supported.
45-
* \[December 10, 2025\] DeepSeek V3.1 is now supported. Use existing configs for [DeepSeek V3 671B](https://github.com/AI-Hypercomputer/maxtext/blob/main/src/MaxText/configs/models/deepseek3-671b.yml) and load in V3.1 checkpoint to use model.
45+
* \[December 10, 2025\] DeepSeek V3.1 is now supported. Use existing configs for [DeepSeek V3 671B](https://github.com/AI-Hypercomputer/maxtext/blob/main/src/maxtext/configs/models/deepseek3-671b.yml) and load in V3.1 checkpoint to use model.
4646
* \[December 9, 2025\] [New RL and SFT Notebook tutorials](https://github.com/AI-Hypercomputer/maxtext/tree/main/src/maxtext/examples) are available.
4747
* \[December 4, 2025\] The [ReadTheDocs documentation site](https://maxtext.readthedocs.io/en/latest/index.html) has been reorganized.
4848
* \[December 3, 2025\] Multi-host support for GSPO and GRPO is now available via [new RL tutorials](https://maxtext.readthedocs.io/en/latest/tutorials/posttraining/rl_on_multi_host.html).

benchmarks/api_server/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export HF_TOKEN=<your_hugging_face_token>
3333

3434
The primary way to launch the API server is by using the `start_server.sh` script. This script ensures that the server is run from the project's root directory, which is necessary for the Python interpreter to find all the required modules.
3535

36-
The script takes the path to a base configuration file (e.g., `MaxText/configs/base.yml`) followed by any number of model-specific configuration overrides.
36+
The script takes the path to a base configuration file (e.g., `maxtext/configs/base.yml`) followed by any number of model-specific configuration overrides.
3737

3838
### Benchmarking Configuration
3939

@@ -56,7 +56,7 @@ Here is an example of how to launch the server with a `qwen3-30b-a3b` model, con
5656
# Make sure you are in the root directory of the maxtext project.
5757

5858
bash benchmarks/api_server/start_server.sh \
59-
MaxText/configs/base.yml \
59+
maxtext/configs/base.yml \
6060
model_name="qwen3-30b-a3b" \
6161
tokenizer_path="Qwen/Qwen3-30B-A3B-Thinking-2507" \
6262
load_parameters_path="<path_to_your_checkpoint>" \
@@ -135,7 +135,7 @@ CMD="export HF_TOKEN=${HF_TOKEN} && \
135135
pip install --upgrade pip && \
136136
pip install -r benchmarks/api_server/requirements.txt && \
137137
bash benchmarks/api_server/start_server.sh \
138-
MaxText/configs/base.yml \
138+
maxtext/configs/base.yml \
139139
model_name="${MODEL_NAME}" \
140140
tokenizer_path="${TOKENIZER_PATH}" \
141141
load_parameters_path="${LOAD_PARAMETERS_PATH}" \

benchmarks/api_server/launch_gke_server.sh.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ CMD="export HF_TOKEN=${HF_TOKEN} && \
5353
pip install --upgrade pip && \
5454
pip install -r benchmarks/api_server/requirements.txt && \
5555
bash benchmarks/api_server/start_server.sh \
56-
MaxText/configs/base.yml \
56+
maxtext/configs/base.yml \
5757
model_name=\"${MODEL_NAME}\" \
5858
tokenizer_path=\"${TOKENIZER_PATH}\" \
5959
load_parameters_path=\"${LOAD_PARAMETERS_PATH}\" \

benchmarks/api_server/start_server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
# Example:
2222
# bash benchmarks/api_server/start_server.sh \
23-
# MaxText/configs/base.yml \
23+
# maxtext/configs/base.yml \
2424
# model_name="qwen3-30b-a3b" \
2525
# tokenizer_path="Qwen/Qwen3-30B-A3B-Thinking-2507" \
2626
# load_parameters_path="<path_to_your_checkpoint>" \

benchmarks/globals.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
r if os.path.isdir(os.path.join(r := os.path.dirname(os.path.dirname(__file__)), ".git")) else MAXTEXT_PKG_DIR,
2626
)
2727

28+
# This is the configs root: with "base.yml"; "models/"; &etc.
29+
MAXTEXT_CONFIGS_DIR = os.environ.get("MAXTEXT_CONFIGS_DIR", os.path.join(MAXTEXT_REPO_ROOT, "src", "maxtext", "configs"))
30+
2831
# This is the assets root: with "tokenizers/"; &etc.
2932
MAXTEXT_ASSETS_ROOT = os.environ.get("MAXTEXT_ASSETS_ROOT", os.path.join(MAXTEXT_REPO_ROOT, "src", "maxtext", "assets"))
3033

31-
__all__ = ["MAXTEXT_ASSETS_ROOT", "MAXTEXT_PKG_DIR", "MAXTEXT_REPO_ROOT"]
34+
__all__ = ["MAXTEXT_ASSETS_ROOT", "MAXTEXT_CONFIGS_DIR", "MAXTEXT_PKG_DIR", "MAXTEXT_REPO_ROOT"]

0 commit comments

Comments
 (0)