Skip to content

Commit 781d30a

Browse files
Merge pull request #3338 from AI-Hypercomputer:bvandermoon-install-maxtext
PiperOrigin-RevId: 879766150
2 parents d73915f + c55c36b commit 781d30a

3 files changed

Lines changed: 65 additions & 12 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ See our guide on running MaxText in decoupled mode, without any GCP dependencies
4141

4242
## 🔥 Latest news 🔥
4343

44-
* \[March 5, 2026\] [Qwen3-Next](https://github.com/AI-Hypercomputer/maxtext/blob/main/tests/end_to_end/tpu/qwen/next/run_qwen3_next.md) is now supported.
44+
* \[March 5, 2026\] New `tpu-post-train` [target in PyPI](https://pypi.org/project/maxtext). Please also use this installation option for running vllm_decode. See the [MaxText installation instructions](https://maxtext.readthedocs.io/en/latest/install_maxtext.html) for more info.
45+
* \[March 5, 2026\] [Qwen3-Next](https://github.com/AI-Hypercomputer/maxtext/blob/7656eb8d1c9eb0dd91e617a6fdf6ad805221221a/tests/end_to_end/tpu/qwen/next/run_qwen3_next.md) is now supported.
4546
* \[February 27, 2026\] New MaxText structure! MaxText has been restructured according to [RESTRUCTURE.md](https://github.com/AI-Hypercomputer/maxtext/blob/1b9e38aa0a19b6018feb3aed757406126b6953a1/RESTRUCTURE.md). Please feel free to share your thoughts and feedback.
4647
* \[December 22, 2025\] [Muon optimizer](https://kellerjordan.github.io/posts/muon) is now supported.
47-
* \[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.
48-
* \[December 9, 2025\] [New RL and SFT Notebook tutorials](https://github.com/AI-Hypercomputer/maxtext/tree/main/src/maxtext/examples) are available.
48+
* \[December 10, 2025\] DeepSeek V3.1 is now supported. Use existing configs for [DeepSeek V3 671B](https://github.com/AI-Hypercomputer/maxtext/blob/7656eb8d1c9eb0dd91e617a6fdf6ad805221221a/src/maxtext/configs/models/deepseek3-671b.yml) and load in V3.1 checkpoint to use model.
49+
* \[December 9, 2025\] [New RL and SFT Notebook tutorials](https://github.com/AI-Hypercomputer/maxtext/tree/7656eb8d1c9eb0dd91e617a6fdf6ad805221221a/src/maxtext/examples) are available.
4950
* \[December 4, 2025\] The [ReadTheDocs documentation site](https://maxtext.readthedocs.io/en/latest/index.html) has been reorganized.
5051
* \[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).
5152
* \[November 20, 2025\] A new guide, [What is Post Training in MaxText?](https://maxtext.readthedocs.io/en/latest/tutorials/post_training_index.html), is now available.

docs/install_maxtext.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
# Install MaxText
1818

1919
This document discusses how to install MaxText. We recommend installing MaxText inside a Python virtual environment.
20+
MaxText offers three installation modes:
21+
22+
1. maxtext[tpu]. Used for pre-training and decode on TPUs.
23+
2. maxtext[cuda12]. Used for pre-training and decode on GPUs.
24+
3. maxtext[tpu-post-train]. Used for post-training on TPUs. Currently, this option should also be used for running vllm_decode on TPUs.
2025

2126
## From PyPI (Recommended)
2227
This is the easiest way to get started with the latest stable version.
@@ -29,11 +34,24 @@ pip install uv
2934
uv venv --python 3.12 --seed maxtext_venv
3035
source maxtext_venv/bin/activate
3136

32-
# 3. Install MaxText and its dependencies
33-
uv pip install maxtext --resolution=lowest
34-
install_maxtext_github_deps
37+
# 3. Install MaxText and its dependencies. Choose a single
38+
# installation option from this list to fit your use case.
39+
40+
# Option 1: Installing maxtext[tpu]
41+
uv pip install maxtext[tpu] --resolution=lowest
42+
install_maxtext_tpu_github_deps
43+
44+
# Option 2: Installing maxtext[cuda12]
45+
uv pip install maxtext[cuda12] --resolution=lowest
46+
install_maxtext_cuda12_github_dep
47+
48+
# Option 3: Installing maxtext[tpu-post-train]
49+
uv pip install maxtext[tpu-post-train] --resolution=lowest
50+
install_maxtext_tpu_post_train_extra_deps
3551
```
36-
> **Note:** The `install_maxtext_github_deps` command is temporarily required to install dependencies directly from GitHub that are not yet available on PyPI.
52+
> **Note:** The `install_maxtext_tpu_github_deps`, `install_maxtext_cuda12_github_dep`, and
53+
`install_maxtext_tpu_post_train_extra_deps` commands are temporarily required to install dependencies directly from GitHub
54+
that are not yet available on PyPI. As shown above, choose the one that corresponds to your use case.
3755

3856
> **Note:** The maxtext package contains a comprehensive list of all direct and transitive dependencies, with lower bounds, generated by [seed-env](https://github.com/google-ml-infra/actions/tree/main/python_seed_env). We highly recommend the `--resolution=lowest` flag. It instructs `uv` to install the specific, tested versions of dependencies defined by MaxText, rather than the latest available ones. This ensures a consistent and reproducible environment, which is critical for stable performance and for running benchmarks.
3957
@@ -50,12 +68,20 @@ pip install uv
5068
uv venv --python 3.12 --seed maxtext_venv
5169
source maxtext_venv/bin/activate
5270

53-
# 3. Install dependencies in editable mode
54-
# install the tpu package
71+
# 3. Install dependencies in editable mode. Choose a single
72+
# installation option from this list to fit your use case.
73+
74+
# Option 1: Installing .[tpu]
5575
uv pip install -e .[tpu] --resolution=lowest
56-
# or install the gpu package by running the following line
57-
# uv pip install -e .[cuda12] --resolution=lowest
58-
install_maxtext_github_deps
76+
install_maxtext_tpu_github_deps
77+
78+
# Option 2: Installing .[cuda12]
79+
uv pip install -e .[cuda12] --resolution=lowest
80+
install_maxtext_cuda12_github_dep
81+
82+
# Option 3: Installing .[tpu-post-train]
83+
uv pip install -e .[tpu-post-train] --resolution=lowest
84+
install_maxtext_tpu_post_train_extra_deps
5985
```
6086

6187
After installation, you can verify the package is available with `python3 -c "import maxtext"` and run training jobs with `python3 -m maxtext.trainers.pre_train.train ...`.
@@ -66,6 +92,8 @@ After installation, you can verify the package is available with `python3 -c "im
6692

6793
This document provides a guide to updating dependencies in MaxText using the `seed-env` tool. `seed-env` helps generate deterministic and reproducible Python environments by creating fully-pinned `requirements.txt` files from a base set of requirements.
6894

95+
Please keep dependencies updated throughout development. This will allow each commit to work properly from both a feature and dependency perspective. We will periodically upload commits to PyPI for stable releases. But it is also critical to keep dependencies in sync for users installing MaxText from source.
96+
6997
## Overview of the Process
7098

7199
To update dependencies, you will follow these general steps:

docs/release_notes.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,30 @@ MaxText is [available in PyPI](https://pypi.org/project/maxtext/) and can be ins
2222

2323
## Releases
2424

25+
### v0.2.0
26+
27+
# Changes
28+
* New `tpu-post-train` target in PyPI. Please also use this installation option for running vllm_decode. See the [MaxText installation instructions](https://maxtext.readthedocs.io/en/latest/install_maxtext.html) for more info.
29+
* [Qwen3-Next](https://github.com/AI-Hypercomputer/maxtext/blob/7656eb8d1c9eb0dd91e617a6fdf6ad805221221a/tests/end_to_end/tpu/qwen/next/run_qwen3_next.md) is now supported.
30+
* New MaxText structure! MaxText has been restructured according to [RESTRUCTURE.md](https://github.com/AI-Hypercomputer/maxtext/blob/1b9e38aa0a19b6018feb3aed757406126b6953a1/RESTRUCTURE.md). Please feel free to share your thoughts and feedback.
31+
* [Muon optimizer](https://kellerjordan.github.io/posts/muon) is now supported.
32+
* DeepSeek V3.1 is now supported. Use existing configs for [DeepSeek V3 671B](https://github.com/AI-Hypercomputer/maxtext/blob/7656eb8d1c9eb0dd91e617a6fdf6ad805221221a/src/maxtext/configs/models/deepseek3-671b.yml) and load in V3.1 checkpoint to use model.
33+
* [New RL and SFT Notebook tutorials](https://github.com/AI-Hypercomputer/maxtext/tree/7656eb8d1c9eb0dd91e617a6fdf6ad805221221a/src/maxtext/examples) are available.
34+
* The [ReadTheDocs documentation site](https://maxtext.readthedocs.io/en/latest/index.html) has been reorganized.
35+
* 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).
36+
* A new guide, [What is Post Training in MaxText?](https://maxtext.readthedocs.io/en/latest/tutorials/post_training_index.html), is now available.
37+
* Ironwood TPU co-designed AI stack announced. Read the [blog post on its co-design with MaxText](https://cloud.google.com/blog/products/compute/inside-the-ironwood-tpu-codesigned-ai-stack?e=48754805).
38+
* [Optimized models tiering documentation](https://maxtext.readthedocs.io/en/latest/reference/models/tiering.html) has been refreshed.
39+
* Added Versioning. Check out our [first set of release notes](https://maxtext.readthedocs.io/en/latest/release_notes.html)!
40+
* Post-Training (SFT, RL) via [Tunix](https://github.com/google/tunix) is now available.
41+
* Vocabulary tiling ([PR](https://github.com/AI-Hypercomputer/maxtext/pull/2242)) is now supported in MaxText! Adjust config `num_vocab_tiling` to unlock more efficient memory usage.
42+
* The GPT-OSS family of models (20B, 120B) is now supported.
43+
44+
# Deprecations
45+
* Many MaxText modules have changed locations. Core commands like train, decode, sft, etc. will still work as expected temporarily. Please update your commands to the latest file locations
46+
* install_maxtext_github_deps installation script replaced with install_maxtext_tpu_github_deps
47+
* `tools/setup/setup_post_training_requirements.sh` for post training dependency installation is deprecated in favor of [pip installation](https://maxtext.readthedocs.io/en/latest/install_maxtext.html)
48+
2549
### v0.1.0
2650

2751
Our first MaxText PyPI package is here! MaxText is a high performance, highly scalable, open-source LLM library and reference implementation written in pure Python/JAX and targeting Google Cloud TPUs and GPUs for training. We are excited to make it easier than ever to get started.

0 commit comments

Comments
 (0)