Skip to content

Commit 08b54e8

Browse files
committed
Upgrade JAX to 0.10.2 for pre-training
1 parent 5a372d8 commit 08b54e8

8 files changed

Lines changed: 5207 additions & 5206 deletions

File tree

.github/workflows/ci_pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}
171171

172172
tpu7x-tests:
173-
name: ${{ matrix.flavor || 'TPU7X' }} tests
173+
name: TPU7X tests
174174
needs: [build_and_upload_maxtext_package]
175175
if: needs.analyze_code_changes.outputs.run_tests == 'true' && github.ref == 'refs/heads/main' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
176176
uses: ./.github/workflows/run_tests_coordinator.yml

.github/workflows/run_pathways_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
PYTHONPATH: "${{ github.workspace }}/src"
130130
services:
131131
resource_manager:
132-
image: us-docker.pkg.dev/cloud-tpu-v2-images/pathways/server:20260413-jax_0.9.2
132+
image: us-docker.pkg.dev/cloud-tpu-v2-images/pathways/server:latest
133133
ports:
134134
- "29001:29001"
135135
- "29002:29002"
@@ -139,7 +139,7 @@ jobs:
139139
TPU_SKIP_MDS_QUERY: true
140140

141141
worker:
142-
image: us-docker.pkg.dev/cloud-tpu-v2-images/pathways/server:20260413-jax_0.9.2
142+
image: us-docker.pkg.dev/cloud-tpu-v2-images/pathways/server:latest
143143
ports:
144144
- "29005:29005"
145145
- "29006:29006"
@@ -150,7 +150,7 @@ jobs:
150150
--tpu=4
151151

152152
proxy:
153-
image: us-docker.pkg.dev/cloud-tpu-v2-images/pathways/proxy_server:20260413-jax_0.9.2
153+
image: us-docker.pkg.dev/cloud-tpu-v2-images/pathways/proxy_server:latest
154154
ports:
155155
- "29000:29000"
156156
env:

docs/development/update_dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ overrides. You will need to do this separately for the TPU and GPU environments.
8080

8181
### TPU Pre-Training
8282

83-
> **Note:** The current `src/dependencies/requirements/generated_requirements/tpu-requirements.txt` in the repository was generated using JAX build commit hash: [efd6cf797ee9c4f29c6c6d5e91ae4432209063be](https://github.com/jax-ml/jax/commit/efd6cf797ee9c4f29c6c6d5e91ae4432209063be). When regenerating the requirements, either use the same commit hash or update this hash if you use a different one.
83+
> **Note:** The current `src/dependencies/requirements/generated_requirements/tpu-requirements.txt` in the repository was generated using JAX build commit hash: [31c559c7744105009f5d5fcfc3919e505db37f8b](https://github.com/jax-ml/jax/commit/31c559c7744105009f5d5fcfc3919e505db37f8b). When regenerating the requirements, either use the same commit hash or update this hash if you use a different one.
8484
8585
If you have made changes to TPU pre-training dependencies in `src/dependencies/requirements/base_requirements/tpu-requirements.txt`, you need to regenerate the pinned pre-training requirements in `generated_requirements/` directory. Run the following command, replacing `<jax-build-commit-hash>` with the hash you copied in the previous step:
8686

@@ -89,7 +89,7 @@ bash src/dependencies/scripts/generate_requirements.sh \
8989
--base-requirements src/dependencies/requirements/base_requirements/tpu-requirements.txt \
9090
--generated-requirements tpu-requirements.txt \
9191
--override-requirements src/dependencies/extra_deps/tpu_overrides.txt \
92-
--seed-commit efd6cf797ee9c4f29c6c6d5e91ae4432209063be
92+
--seed-commit 31c559c7744105009f5d5fcfc3919e505db37f8b
9393

9494
# Copy generated requirements to src/dependencies/requirements/generated_requirements
9595
mv generated_artifacts/python3_12/tpu-requirements.txt \

src/dependencies/requirements/generated_requirements/tpu-requirements.txt

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ array-record>=0.8.3
1515
astroid>=4.0.4
1616
astunparse>=1.6.3
1717
attrs>=26.1.0
18-
auditwheel>=6.6.0
18+
auditwheel>=6.7.0
1919
black>=25.12.0
2020
blobfile>=3.2.0
21-
build>=1.4.3
22-
certifi>=2026.2.25
21+
build>=1.5.0
22+
certifi>=2026.6.17
2323
cffi>=2.0.0 ; platform_python_implementation != 'PyPy'
2424
cfgv>=3.5.0
2525
charset-normalizer>=3.4.7
@@ -30,10 +30,10 @@ cloudpickle>=3.1.2
3030
clu>=0.0.12
3131
colorama>=0.4.6
3232
contourpy>=1.3.3
33-
coverage>=7.14.3
33+
coverage>=7.15.0
3434
cryptography>=49.0.0
3535
cycler>=0.12.1
36-
datasets>=5.0.0
36+
datasets>=4.8.5
3737
decorator>=5.3.1
3838
dill>=0.4.1
3939
distlib>=0.4.3
@@ -45,13 +45,13 @@ editdistance>=0.8.1
4545
einops>=0.8.2
4646
einshape>=1.0
4747
etils>=1.14.0
48-
evaluate>=0.4.6
48+
evaluate>=0.2.0
4949
execnet>=2.1.2
5050
fastapi>=0.139.0
51-
filelock>=3.28.0
51+
filelock>=3.29.4
5252
flatbuffers>=25.12.19
5353
flax>=0.12.7
54-
fonttools>=4.62.1
54+
fonttools>=4.63.0
5555
frozenlist>=1.8.0
5656
fsspec>=2026.2.0
5757
gast>=0.7.0
@@ -79,42 +79,42 @@ google-resumable-media>=2.10.0
7979
googleapis-common-protos>=1.75.0
8080
grain>=0.2.18
8181
grpc-google-iam-v1>=0.14.4
82-
grpcio>=1.80.0
83-
grpcio-status>=1.80.0
82+
grpcio>=1.81.1
83+
grpcio-status>=1.81.1
8484
gviz-api>=1.10.0
8585
h11>=0.16.0
8686
h5py>=3.14.0
8787
hf-xet>=1.5.1 ; platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'
8888
httpcore>=1.0.9
8989
httplib2>=0.32.0
9090
httpx>=0.28.1
91-
huggingface-hub>=1.21.0
91+
huggingface-hub>=1.22.0
9292
humanize>=4.16.0
9393
hypothesis>=6.142.1
9494
identify>=2.6.19
95-
idna>=3.11
95+
idna>=3.18
9696
immutabledict>=4.3.1
9797
importlab>=0.8.1
9898
iniconfig>=2.3.0
9999
isort>=8.0.1
100-
jax>=0.10.0
101-
jaxlib>=0.10.0
100+
jax>=0.10.2
101+
jaxlib>=0.10.2
102102
jaxtyping>=0.3.11
103103
jinja2>=3.1.6
104104
joblib>=1.5.3
105105
jsonlines>=4.0.0
106-
keras>=3.14.0
106+
keras>=3.14.1
107107
kiwisolver>=1.5.0
108108
latex2sympy2-extended>=1.11.0
109109
libclang>=18.1.1
110110
libcst>=1.8.6
111-
libtpu>=0.0.40 ; platform_machine == 'x86_64' and sys_platform == 'linux'
111+
libtpu>=0.0.42.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
112112
lxml>=6.1.1
113113
markdown>=3.10.2
114-
markdown-it-py>=4.0.0
114+
markdown-it-py>=4.2.0
115115
markupsafe>=3.0.3
116116
math-verify>=0.9.0
117-
matplotlib>=3.10.8
117+
matplotlib>=3.11.0
118118
mccabe>=0.7.0
119119
mdurl>=0.1.2
120120
ml-collections>=1.1.0
@@ -134,17 +134,17 @@ nltk>=3.9.4
134134
nodeenv>=1.10.0
135135
numpy>=2.0.2
136136
numpy-typing-compat>=20251206.2.0
137-
nvidia-cuda-cccl>=13.2.75
137+
nvidia-cuda-cccl>=13.3.3.3.1 ; sys_platform == 'linux'
138138
nvidia-ml-py>=13.610.43
139139
oauthlib>=3.3.1
140140
omegaconf>=2.3.1
141141
opentelemetry-api>=1.43.0
142142
opt-einsum>=3.4.0
143143
optax>=0.2.8
144-
optree>=0.19.0
145-
optype>=0.17.0
144+
optree>=0.19.1
145+
optype>=0.17.1
146146
orbax-checkpoint>=0.12.1
147-
packaging>=26.1
147+
packaging>=26.2
148148
pandas>=3.0.3
149149
parameterized>=0.9.0
150150
pathspec>=1.1.1
@@ -154,7 +154,7 @@ platformdirs>=4.10.0
154154
pluggy>=1.6.0
155155
portpicker>=1.6.0
156156
pre-commit>=4.6.0
157-
prometheus-client>=0.20.0
157+
prometheus-client>=0.25.0
158158
promise>=2.3
159159
propcache>=0.5.2
160160
proto-plus>=1.28.0
@@ -169,7 +169,7 @@ pycryptodomex>=3.23.0
169169
pydantic>=2.13.4
170170
pydantic-core>=2.46.4
171171
pydot>=4.0.1
172-
pyelftools>=0.32
172+
pyelftools>=0.33
173173
pyglove>=0.4.5
174174
pygments>=2.20.0
175175
pyink>=25.12.0
@@ -178,21 +178,22 @@ pynvml>=13.0.1
178178
pyopenssl>=26.3.0
179179
pyparsing>=3.3.2
180180
pyproject-hooks>=1.2.0
181-
pytest>=8.4.2
181+
pytest>=9.1.0
182182
pytest-xdist>=3.8.0
183183
python-dateutil>=2.9.0.post0
184-
python-discovery>=1.4.2
184+
python-discovery>=1.4.3
185185
pytokens>=0.4.1
186186
pytype>=2024.10.11
187187
pyyaml>=6.0.3
188188
qwix>=0.1.8
189189
regex>=2026.6.28
190-
requests>=2.33.1
190+
requests>=2.34.2
191191
requests-oauthlib>=2.0.0
192+
responses>=0.18.0
192193
rich>=15.0.0
193194
safetensors>=0.8.0
194195
scipy>=1.17.1
195-
scipy-stubs>=1.17.1.4
196+
scipy-stubs>=1.17.1.5
196197
sentencepiece>=0.2.1
197198
seqio>=0.0.20
198199
setuptools>=82.0.1
@@ -224,24 +225,24 @@ toml>=0.10.2
224225
tomlkit>=0.15.0
225226
toolz>=1.1.0
226227
tqdm>=4.68.3
227-
transformers>=5.12.1
228+
transformers>=5.13.0
228229
treescope>=0.1.10
229230
typeguard>=2.13.3
230-
typer>=0.25.1
231+
typer>=0.26.8
231232
typing-extensions>=4.15.0
232233
typing-inspection>=0.4.2
233234
tzdata>=2026.2 ; sys_platform == 'emscripten' or sys_platform == 'win32'
234235
uritemplate>=4.2.0
235-
urllib3>=2.6.3
236-
uvicorn>=0.49.0
236+
urllib3>=2.7.0
237+
uvicorn>=0.50.2
237238
uvloop>=0.22.1
238-
virtualenv>=21.5.1
239+
virtualenv>=21.5.2
239240
wadler-lindig>=0.1.7
240241
websockets>=16.0
241242
werkzeug>=3.1.8
242-
wheel>=0.46.3
243+
wheel>=0.47.0
243244
wrapt>=2.2.2
244-
xxhash>=3.8.0
245+
xxhash>=3.8.1
245246
yarl>=1.24.2
246-
zipp>=3.23.1
247+
zipp>=4.1.0
247248
zstandard>=0.25.0

tests/unit/moe_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def loss_fn(params, x):
701701
# test). Without checking this, DCE removes the bwd entirely.
702702
self.assertEqual(x_grad_ref.shape, x_grad_rs.shape, "Hidden-state grad shape mismatch")
703703
self.assertTrue(
704-
jnp.allclose(x_grad_rs.astype(jnp.float32), x_grad_ref.astype(jnp.float32), rtol=1e-2, atol=1e-2),
704+
jnp.allclose(x_grad_rs.astype(jnp.float32), x_grad_ref.astype(jnp.float32), rtol=1e-2, atol=8e-2),
705705
msg=(
706706
"Hidden-state gradient mismatch: max abs diff="
707707
f"{jnp.max(jnp.abs(x_grad_rs.astype(jnp.float32) - x_grad_ref.astype(jnp.float32)))}"
@@ -715,7 +715,7 @@ def loss_fn(params, x):
715715
for i, (g_ref, g_rs) in enumerate(zip(leaves_ref, leaves_rs)):
716716
self.assertEqual(g_ref.shape, g_rs.shape, f"Grad shape mismatch at leaf {i}")
717717
self.assertTrue(
718-
jnp.allclose(g_rs.astype(jnp.float32), g_ref.astype(jnp.float32), rtol=1e-2, atol=1e-2),
718+
jnp.allclose(g_rs.astype(jnp.float32), g_ref.astype(jnp.float32), rtol=1e-2, atol=8e-2),
719719
msg=(
720720
f"Gradient mismatch at leaf {i} (shape={g_ref.shape}): "
721721
f"max abs diff={jnp.max(jnp.abs(g_rs.astype(jnp.float32) - g_ref.astype(jnp.float32)))}"

0 commit comments

Comments
 (0)