-
Notifications
You must be signed in to change notification settings - Fork 25
Add new training recipes for v5p #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Instructions for training DeepSeek-671B-MaxText on TPU v5p-1024 | ||
|
|
||
| ## XPK setup | ||
| Please follow this [link](https://github.com/AI-Hypercomputer/tpu-recipes/blob/main/training/XPK_README.md) to create your GKE cluster with XPK | ||
|
|
||
| ## Prep for Maxtext | ||
|
|
||
| 1. Clone [Maxtext](https://github.com/AI-Hypercomputer/maxtext) repo | ||
| ``` | ||
| git clone https://github.com/AI-Hypercomputer/maxtext.git | ||
| cd maxtext | ||
| git checkout 3eb77db3c94580f56f1b738f8d254b03bd205e35 | ||
| ``` | ||
|
|
||
| 2. Run the following commands to build the docker image | ||
| ``` | ||
| bash docker_build_dependency_image.sh DEVICE=tpu MODE=stable JAX_VERSION=0.7.0 | ||
| ``` | ||
|
|
||
| 3. Create your new GCS bucket | ||
|
|
||
| This is the GCS folder for storing test results. You can re-use any of your existing GCS buckets. To create a new bucket: | ||
| ``` | ||
| GCS_PATH=gs://v5p-demo #<your_GCS_folder_for_results> | ||
| gcloud storage buckets create ${GCS_PATH} --project ${PROJECT} | ||
| ``` | ||
|
|
||
| 4. Specify your workload enviroment variables | ||
| ``` | ||
| export PROJECT=#<your_compute_project> | ||
| export ZONE=#<your_compute_zone> | ||
| export CLUSTER_NAME=#<your_cluster_name> | ||
| export OUTPUT_DIR=gs://v5p-demo/ #<your_GCS_folder_for_results> | ||
| export DEVICE_TYPE=${DEVICE_TYPE} # v5p-1024 for 512 v5p chips | ||
| ``` | ||
|
|
||
| ## Run workloads | ||
|
|
||
| 5. From the MaxText root directory, start your workload: | ||
| ``` | ||
| python3 -m benchmarks.benchmark_runner xpk \ | ||
| --project=$PROJECT \ | ||
| --zone=$ZONE \ | ||
| --device_type=${DEVICE_TYPE} \ | ||
| --num_slices=1 \ | ||
| --cluster_name=${CLUSTER_NAME} \ | ||
| --base_output_directory=${OUTPUT_DIR} \ | ||
| --model_name="deepseek3_671b_v5p_1024" \ | ||
| --base_docker_image=maxtext_base_image | ||
| ``` | ||
|
|
||
| 6. Check the training log | ||
|
|
||
| From your workload logs, you should see step time logs like the following, as training progresses: | ||
| ``` | ||
| completed step: 11, seconds: 90.668, TFLOP/s/device: 152.415, Tokens/s/device: 542.108, total_weights: 25165824, loss: 10.989 | ||
| ``` | ||
|
|
||
| 7. Workload configuration | ||
|
|
||
| Workload configuration details can be found [here](https://github.com/AI-Hypercomputer/maxtext/blob/3eb77db3c94580f56f1b738f8d254b03bd205e35/benchmarks/maxtext_v5p_model_configs.py) in MaxText GitHub repo. Look for the configuration `deepseek3_671b_v5p_1024`. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.