Skip to content

Commit 46ef716

Browse files
committed
add exact_answer reward; make reward_fn name visible to tunix
1 parent 61fa4f3 commit 46ef716

161 files changed

Lines changed: 1444 additions & 4062 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/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tests/inference/ @vipannalla @mitalisi @gpolovets1 @mailvijayasingh @jrplatin @p
2222
src/maxtext/inference @vipannalla @mitalisi @gpolovets1 @mailvijayasingh @jrplatin @patemotter @lumosis @richjames0
2323

2424
# Dockerfiles and dependencies
25-
src/dependencies/ @bvandermoon @SurbhiJainUSC @parambole @richjames0 @shralex
25+
src/dependencies/ @bvandermoon @parambole @richjames0 @shralex
2626

2727
# Docs
2828
docs/ @jacoguzo @bvandermoon @richjames0 @shralex @gobbleturk @RissyRan @gagika @A9isha @jiangjy1982 @vipannalla

.github/workflows/build_and_push_docker_image.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ jobs:
122122
DEVICE=${{ inputs.device }}
123123
MODE=${{ inputs.build_mode }}
124124
WORKFLOW=${{ inputs.workflow }}
125-
PACKAGE_DIR=./src
126125
JAX_VERSION=NONE
127126
LIBTPU_VERSION=NONE
128127
INCLUDE_TEST_ASSETS=true

.github/workflows/build_and_test_maxtext.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ jobs:
262262
tf_force_gpu_allow_growth: false
263263
container_resource_option: "--privileged"
264264
is_scheduled_run: ${{ github.event_name == 'schedule' }}
265-
extra_pip_deps_file: 'src/dependencies/github_deps/post_train_base_deps.txt'
265+
extra_pip_deps_file: 'src/install_maxtext_extra_deps/extra_post_train_base_deps_from_github.txt'
266266
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}
267267

268268
maxtext_post_training_tpu_unit_tests:
@@ -284,7 +284,7 @@ jobs:
284284
tf_force_gpu_allow_growth: false
285285
container_resource_option: "--privileged"
286286
is_scheduled_run: ${{ github.event_name == 'schedule' }}
287-
extra_pip_deps_file: 'src/dependencies/github_deps/post_train_base_deps.txt'
287+
extra_pip_deps_file: 'src/install_maxtext_extra_deps/extra_post_train_base_deps_from_github.txt'
288288
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}
289289

290290
maxtext_gpu_integration_tests:

.github/workflows/run_pathways_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
source .venv/bin/activate
8686
maxtext_wheel=$(ls maxtext-*-py3-none-any.whl 2>/dev/null)
8787
uv pip install ${maxtext_wheel}[tpu] --resolution=lowest
88-
uv pip install -r src/dependencies/github_deps/pre_train_deps.txt
88+
uv pip install -r src/install_maxtext_extra_deps/extra_deps_from_github.txt
8989
python3 --version
9090
python3 -m pip freeze
9191
- name: Copy test assets files

.github/workflows/run_tests_against_package.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
source .venv/bin/activate
9797
maxtext_wheel=$(ls maxtext-*-py3-none-any.whl 2>/dev/null)
9898
uv pip install ${maxtext_wheel}[${MAXTEXT_PACKAGE_EXTRA}] --resolution=lowest
99-
uv pip install -r src/dependencies/github_deps/pre_train_deps.txt
99+
uv pip install -r src/install_maxtext_extra_deps/extra_deps_from_github.txt
100100
python3 --version
101101
python3 -m pip freeze
102102
uv pip install pytest-cov
@@ -131,10 +131,12 @@ jobs:
131131
else
132132
SPLIT_ARGS=""
133133
fi
134+
# TODO: Fix the skipped tests and remove the deselect flags
134135
.venv/bin/python3 -m pytest ${INPUTS_PYTEST_ADDOPTS} \
135136
-v \
136137
-m "${FINAL_PYTEST_MARKER}" \
137138
--durations=0 \
139+
--deselect "tests/unit/tokenizer_test.py::TokenizerTest::test_detokenize" \
138140
--cov=MaxText \
139141
--cov=maxtext \
140142
--cov-report=xml \

PREFLIGHT.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# Optimization 1: Multihost recommended network settings
2-
We included all the recommended network settings in [rto_setup.sh](https://github.com/google/maxtext/blob/main/src/dependencies/scripts/rto_setup.sh).
2+
We included all the recommended network settings in [rto_setup.sh](https://github.com/google/maxtext/blob/main/rto_setup.sh).
33

4-
[preflight.sh](https://github.com/google/maxtext/blob/main/src/dependencies/scripts/preflight.sh) will help you apply them based on GCE or GKE platform.
4+
[preflight.sh](https://github.com/google/maxtext/blob/main/preflight.sh) will help you apply them based on GCE or GKE platform.
55

66
Before you run ML workload on Multihost with GCE or GKE, simply apply `bash preflight.sh PLATFORM=[GCE or GKE]` to leverage the best DCN network performance.
77

88
Here is an example for GCE:
99
```
10-
bash src/dependencies/scripts/preflight.sh PLATFORM=GCE && python3 -m maxtext.trainers.pre_train.train run_name=${YOUR_JOB_NAME?}
10+
bash preflight.sh PLATFORM=GCE && python3 -m maxtext.trainers.pre_train.train run_name=${YOUR_JOB_NAME?}
1111
```
1212

1313
Here is an example for GKE:
1414
```
15-
bash src/dependencies/scripts/preflight.sh PLATFORM=GKE && python3 -m maxtext.trainers.pre_train.train run_name=${YOUR_JOB_NAME?}
15+
bash preflight.sh PLATFORM=GKE && python3 -m maxtext.trainers.pre_train.train run_name=${YOUR_JOB_NAME?}
1616
```
1717

1818
# Optimization 2: Numa binding (You can only apply this to v4 and v5p)
1919
NUMA binding is recommended for enhanced performance, as it reduces memory latency and maximizes data throughput, ensuring that your high-performance applications operate more efficiently and effectively.
2020

2121
For GCE,
22-
[preflight.sh](https://github.com/google/maxtext/blob/main/src/dependencies/scripts/preflight.sh) will help you install `numactl` dependency, so you can use it directly, here is an example:
22+
[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 src/dependencies/scripts/preflight.sh PLATFORM=GCE && numactl --membind 0 --cpunodebind=0 python3 -m maxtext.trainers.pre_train.train run_name=${YOUR_JOB_NAME?}
25+
bash preflight.sh PLATFORM=GCE && numactl --membind 0 --cpunodebind=0 python3 -m maxtext.trainers.pre_train.train 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/src/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 src/dependencies/scripts/preflight.sh PLATFORM=GKE && numactl --membind 0 --cpunodebind=0 python3 -m maxtext.trainers.pre_train.train run_name=${YOUR_JOB_NAME?}
32+
bash preflight.sh PLATFORM=GKE && numactl --membind 0 --cpunodebind=0 python3 -m maxtext.trainers.pre_train.train 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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ MaxText aims to provide you with the best OSS models, whether as a reference imp
107107
* Gemma 2 (2B, 9B, 27B)
108108
* Gemma 1 (2B, 7B)
109109
* Alibaba
110-
* Qwen 2.5 (7B, 14B)
111110
* Qwen 3 MoE 2507 (235B, 480B)
112111
* Qwen 3 MoE (30B, 235B)
113112
* Qwen 3 Dense (0.6B, 1.7B, 4B, 8B, 14B, 32B)

benchmarks/maxtext_xpk_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def build_user_command(
428428
if wl_config.hlo_dump:
429429
hlo_dump = "XLA_FLAGS='--xla_dump_large_constants --xla_dump_to=/tmp/xla_dump'"
430430
upload_hlo_dump = (
431-
f" && gcloud storage cp -r /tmp/xla_dump {wl_config.base_output_directory}/{wl_config.run_name}/hlo_dump"
431+
f" && gsutil -m cp -r /tmp/xla_dump {wl_config.base_output_directory}/{wl_config.run_name}/hlo_dump"
432432
)
433433
# Construct the command string with proper formatting and line continuations
434434
command = " ".join(

benchmarks/upload_metrics_to_bq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def add_parser_arguments(parser: argparse.ArgumentParser):
187187

188188

189189
def download_metrics_file_locally(metrics_gcs_file: str, local_file: str) -> int:
190-
command = f"gcloud storage cp --recursive {metrics_gcs_file} {local_file}"
190+
command = f"gsutil cp -r {metrics_gcs_file} {local_file}"
191191
return run_command_with_updates(command, f"Download {metrics_gcs_file} in {local_file}")
192192

193193

docs/build_maxtext.md

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)