You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/install_maxtext.md
+49-23Lines changed: 49 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,9 +124,11 @@ You can find the latest commit hashes in the [JAX `build/` folder](https://githu
124
124
125
125
Next, run the `seed-env` CLI to generate the new requirements files. You will need to do this separately for the TPU and GPU environments. The generated files will be placed in a directory specified by `--output-dir`.
126
126
127
-
### For TPU
127
+
> **Note:** The current `src/dependencies/requirements/generated_requirements/` in the repository were generated using JAX build commit: [d83b06508d669add43a8875ae7fd9e9fe7abf160](https://github.com/jax-ml/jax/commit/d83b06508d669add43a8875ae7fd9e9fe7abf160).
128
128
129
-
Run the following command, replacing `<jax-build-commit-hash>` with the hash you copied in the previous step.
129
+
### TPU Pre-Training
130
+
131
+
If you have made changes to the pre-training dependencies in `src/dependencies/requirements/base_requirements/tpu-base-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:
130
132
131
133
```bash
132
134
seed-env \
@@ -138,53 +140,77 @@ seed-env \
138
140
--output-dir=generated_tpu_artifacts
139
141
```
140
142
141
-
### For GPU
143
+
After generating the new requirements, you need to copy the generated files from `generated_tpu_artifacts/tpu-requirements.txt` to `src/dependencies/requirements/generated_requirements/tpu-requirements.txt`.
144
+
145
+
#### TPU Post-Training
142
146
143
-
Similarly, run the command for the GPU requirements.
147
+
If you have made changes to the post-training dependencies in `src/dependencies/requirements/base_requirements/tpu-post-train-requirements.txt`, you need to regenerate the pinned post-training requirements in `generated_requirements/` directory. Run the following command, replacing `<jax-build-commit-hash>` with the hash you copied in the previous step:
After generating the new requirements, you need to copy the generated files from `generated_tpu_post_train_artifacts/tpu-post-train-requirements.txt` to `src/dependencies/requirements/generated_requirements/tpu-post-train-requirements.txt`.
157
160
158
-
After generating the new requirements, you need to update the files in the MaxText repository.
161
+
### GPU Pre-Training
159
162
160
-
1.**Copy the generated files:**
163
+
If you have made changes to the GPU pre-training dependencies in `src/dependencies/requirements/base_requirements/gpu-base-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:
161
164
162
-
- Move `generated_tpu_artifacts/tpu-requirements.txt` to `generated_requirements/tpu-requirements.txt`.
163
-
- Move `generated_gpu_artifacts/cuda12-requirements.txt` to `generated_requirements/cuda12-requirements.txt`.
Currently, MaxText uses a few dependencies, such as `mlperf-logging` and `google-jetstream`, that are installed directly from GitHub source. These are defined in `base_requirements/requirements.txt`, and the `seed-env` tool will carry them over to the generated requirements files.
176
+
After generating the new requirements, you need to copy the generated files from `generated_gpu_artifacts/cuda12-requirements.txt` to `src/dependencies/requirements/generated_requirements/cuda12-requirements.txt`.
167
177
168
-
## Step 5: Verify the New Dependencies
178
+
## Step 4: Verify the New Dependencies
169
179
170
180
Finally, test that the new dependencies install correctly and that MaxText runs as expected.
171
181
172
182
1.**Create a clean environment:** It's best to start with a fresh Python virtual environment.
173
183
174
184
```bash
185
+
# Ensure uv is installed
186
+
pip install uv
187
+
188
+
# Create and activate the virtual environment
175
189
uv venv --python 3.12 --seed maxtext_venv
176
190
source maxtext_venv/bin/activate
177
191
```
178
192
179
-
2.**Run the setup script:** Execute `bash setup.sh` to install the new dependencies.
193
+
2.**Install MaxText and dependencies**: Install the package in editable mode with the appropriate extras. Choose the command that matches your hardware:
194
+
195
+
**TPU Pre-Training**:
180
196
181
197
```bash
182
-
pip install uv
183
-
# install the tpu package
184
198
uv pip install -e .[tpu] --resolution=lowest
185
-
# or install the gpu package by running the following line:
3.**Run tests:** Run MaxText tests to ensure there are no regressions.
216
+
3.**Verify the installation**: Run MaxText tests to ensure everything is working as expected with the newly installed dependencies and there are no regressions.
0 commit comments