Skip to content

Commit e28978e

Browse files
Merge pull request #3545 from AI-Hypercomputer:bvandermoon-uxr
PiperOrigin-RevId: 893695294
2 parents c38fa86 + b9b708b commit e28978e

3 files changed

Lines changed: 53 additions & 31 deletions

File tree

docs/_static/js/editable_commands.js

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,65 @@ document.addEventListener('DOMContentLoaded', () => {
1010
const originalHTML = block.innerHTML;
1111

1212
const placeholders = [
13-
"<your virtual env name>",
14-
"<model name>",
15-
"<tokenizer path>",
16-
"<Hugging Face access token>",
17-
"<output directory to store run logs>",
18-
"<name for this run>",
19-
"<number of fine-tuning steps to run>",
2013
"<batch size per device>",
21-
"<Hugging Face dataset name>",
22-
"<data split for train>",
14+
"<bucket>",
15+
"<cluster name>",
2316
"<data columns to train on>",
17+
"<Data Columns to Train on>",
18+
"<data split for train>",
19+
"<Data Split for Train>",
20+
"<dataset path>",
21+
"<Docker Image Name>",
22+
"<Fine-Tuning Steps>",
23+
"<Flag to lazy load>",
24+
"<Flag to use ocdbt>",
25+
"<Flag to use zarr3>",
26+
"<folder>",
2427
"<gcs path for MaxText checkpoint>",
25-
"<Google Cloud Project ID>",
26-
"<Name of GKE Cluster>",
27-
"<GKE Cluster Zone>",
28-
"<Name of Workload>",
29-
"<TPU Type>",
3028
"<GCS Path for Output/Logs>",
31-
"<Fine-Tuning Steps>",
29+
"<GCS for dataset>",
30+
"<GCP project ID>",
31+
"<GCP zone>",
32+
"<gke version>",
33+
"<GKE Cluster Zone>",
34+
"<Google Cloud Project ID>",
3235
"<Hugging Face Access Token>",
33-
"<Model Name>",
34-
"<Model Tokenizer>",
36+
"<Hugging Face access token>",
3537
"<Hugging Face Dataset Name>",
36-
"<Data Split for Train>",
37-
"<Data Columns to Train on>",
38-
"<cluster name>",
39-
"<GCP project ID>",
40-
"<zone name>",
41-
"<path/to/gcr.io>",
42-
"<number of slices>",
43-
"<Flag to use zarr3>",
44-
"<Flag to use ocdbt>",
38+
"<Hugging Face dataset name>",
4539
"<Hugging Face Model>",
40+
"<Hugging Face Model to be converted to MaxText>",
4641
"<MaxText Model>",
47-
"<Tokenizer>",
42+
"<MaxText model name>",
43+
"<Model Name>",
44+
"<model name>",
45+
"<Model Tokenizer>",
46+
"<name for this run>",
4847
"<Name for this run>",
49-
"<Docker Image Name>"
48+
"<Name of GKE Cluster>",
49+
"<Name of Workload>",
50+
"<number of fine-tuning steps to run>",
51+
"<number of slices>",
52+
"<output directory to store Hugging Face checkpoint>",
53+
"<output directory to store MaxText checkpoint>",
54+
"<output directory to store run logs>",
55+
"<path to Hugging Face checkpoint>",
56+
"<path/to/gcr.io>",
57+
"<project id>",
58+
"<project ID>",
59+
"<project>",
60+
"<ramdisk size>",
61+
"<steps>",
62+
"<the number of chips per VM>",
63+
"<Tokenizer>",
64+
"<tokenizer path>",
65+
"<TPU Type>",
66+
"<virtual env name>",
67+
"<your virtual env name>",
68+
"<your zone>",
69+
"<YOUR WORKLOAD NAME>",
70+
"<zone>",
71+
"<zone name>"
5072
];
5173

5274
let newHTML = originalHTML;

docs/guides/data_input_pipeline/data_input_grain.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Grain ensures determinism in data input pipelines by saving the pipeline's state
3434

3535
1. Grain currently supports three data formats: [ArrayRecord](https://github.com/google/array_record) (random access), [Parquet](https://arrow.apache.org/docs/python/parquet.html) (partial random-access through row groups) and [TFRecord](https://www.tensorflow.org/tutorials/load_data/tfrecord)(sequential access). Only the ArrayRecord format supports the global shuffle mentioned above. For converting a dataset into ArrayRecord, see [Apache Beam Integration for ArrayRecord](https://github.com/google/array_record/tree/main/beam). Additionally, other random access data sources can be supported via a custom [data source](https://google-grain.readthedocs.io/en/latest/data_sources/protocol.html) class.
3636
- **Community Resource**: The MaxText community has created a [ArrayRecord Documentation](https://array-record.readthedocs.io/). Note: we appreciate the contribution from the community, but as of now it has not been verified by the MaxText or ArrayRecord developers yet.
37-
2. If the dataset is hosted on a Cloud Storage bucket, the path `gs://` can be provided directly. However, for the best performance, it's recommended to read the bucket through [Cloud Storage FUSE](https://cloud.google.com/storage/docs/gcs-fuse). This will significantly improve the perf for the ArrayRecord format as it allows meta data caching to speeds up random access. The installation of Cloud Storage FUSE is included in [setup.sh](https://github.com/google/maxtext/blob/main/src/dependencies/scripts/setup.sh). The user then needs to mount the Cloud Storage bucket to a local path for each worker, using the script [setup_gcsfuse.sh](https://github.com/google/maxtext/blob/main/tools/setup/setup_gcsfuse.sh). The script configures some parameters for the mount.
37+
2. If the dataset is hosted on a Cloud Storage bucket, the path `gs://` can be provided directly. However, for the best performance, it's recommended to read the bucket through [Cloud Storage FUSE](https://cloud.google.com/storage/docs/gcs-fuse). This will significantly improve the perf for the ArrayRecord format as it allows meta data caching to speeds up random access. The installation of Cloud Storage FUSE is included in [setup.sh](https://github.com/google/maxtext/blob/main/src/dependencies/scripts/setup.sh). The user then needs to mount the Cloud Storage bucket to a local path for each worker, using the script [setup_gcsfuse.sh](https://github.com/AI-Hypercomputer/maxtext/blob/4e44e065cc6379e76f9f1ac4785f81c05cafb58f/src/dependencies/scripts/setup_gcsfuse.sh). The script configures some parameters for the mount.
3838

3939
```sh
4040
bash tools/setup/setup_gcsfuse.sh \
@@ -47,7 +47,7 @@ Note that `FILE_PATH` is optional; when provided, the script runs `ls -R` for pr
4747

4848
1. Set `dataset_type=grain`, `grain_file_type={arrayrecord|parquet|tfrecord}`, `grain_train_files` in `src/maxtext/configs/base.yml` or through command line arguments to match the file pattern on the mounted local path.
4949

50-
2. Tune `grain_worker_count` for performance. This parameter controls the number of child processes used by Grain (more details in [behind_the_scenes](https://google-grain.readthedocs.io/en/latest/behind_the_scenes.html)). If you use a large number of workers, check your config for gcsfuse in [setup_gcsfuse.sh](https://github.com/google/maxtext/blob/main/tools/setup/setup_gcsfuse.sh) to avoid gcsfuse throttling.
50+
2. Tune `grain_worker_count` for performance. This parameter controls the number of child processes used by Grain (more details in [behind_the_scenes](https://google-grain.readthedocs.io/en/latest/behind_the_scenes.html)). If you use a large number of workers, check your config for gcsfuse in [setup_gcsfuse.sh](https://github.com/AI-Hypercomputer/maxtext/blob/4e44e065cc6379e76f9f1ac4785f81c05cafb58f/src/dependencies/scripts/setup_gcsfuse.sh) to avoid gcsfuse throttling.
5151

5252
3. ArrayRecord Only: For multi-source blending, you can specify multiple data sources with their respective weights using semicolon (;) as a separator and a comma (,) for weights. The weights will be automatically normalized to sum to 1.0. For example:
5353

docs/tutorials/pretraining.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ eval metrics after step: 9, loss=9.420, total_weights=75264.0
8787

8888
Grain is a library for reading data for training and evaluating JAX models. It is the recommended input pipeline for determinism and resilience! It supports data formats like ArrayRecord and Parquet. You can check [Grain pipeline](../guides/data_input_pipeline/data_input_grain.md) for more details.
8989

90-
**Data preparation**: You need to download data to a Cloud Storage bucket, and read data via Cloud Storage Fuse with [setup_gcsfuse.sh](https://github.com/AI-Hypercomputer/maxtext/blob/main/tools/setup/setup_gcsfuse.sh).
90+
**Data preparation**: You need to download data to a Cloud Storage bucket, and read data via Cloud Storage Fuse with [setup_gcsfuse.sh](https://github.com/AI-Hypercomputer/maxtext/blob/4e44e065cc6379e76f9f1ac4785f81c05cafb58f/src/dependencies/scripts/setup_gcsfuse.sh).
9191

9292
- For example, we can mount the bucket `gs://maxtext-dataset` on the local path `/tmp/gcsfuse` before training
9393
```bash

0 commit comments

Comments
 (0)