Skip to content

Commit 526f467

Browse files
Merge pull request #3615 from AI-Hypercomputer:bvandermoon-uxr
PiperOrigin-RevId: 900246240
2 parents 4909a0a + 19a975a commit 526f467

9 files changed

Lines changed: 19 additions & 16 deletions

File tree

docs/run_maxtext/decoupled_mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Optional environment variables:
5151

5252
## Centralized Decoupling API (`gcloud_stub.py`)
5353

54-
MaxText exposes a single module `MaxText.gcloud_stub` to avoid scattering environment checks:
54+
MaxText exposes a single module `maxtext.common.gcloud_stub` to avoid scattering environment checks:
5555

5656
```python
57-
from MaxText.gcloud_stub import is_decoupled, cloud_diagnostics, jetstream
57+
from maxtext.common.gcloud_stub import is_decoupled, cloud_diagnostics, jetstream
5858

5959
if is_decoupled():
6060
# Skip optional integrations or use local fallbacks

src/maxtext/checkpoint_conversion/standalone_scripts/llama4_ckpt_unscanned.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
2222
Example cmd:
2323
To save a ckpt
24-
JAX_PLATFORMS=CPU python -m MaxText.utils.ckpt_scripts.llama4_ckpt_unscanned --base-model-path [CHKPT_DIR] \
25-
--maxtext-model-path [OUTPUT_CHKPT_DIR] --model-size llama4-17b-16e
24+
JAX_PLATFORMS=CPU python -m maxtext.checkpoint_conversion.standalone_scripts.llama4_ckpt_unscanned \
25+
--base-model-path [CHKPT_DIR] \
26+
--maxtext-model-path [OUTPUT_CHKPT_DIR] \
27+
--model-size llama4-17b-16e
2628
2729
If using a PT checkpoint, the base model checkpoints should be in the format `{name}.{chkpt_idx}.pth`
2830
For example: `llama4-17b-16e.00.pth`

src/maxtext/examples/multimodal_gemma3_demo.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
"outputs": [],
6464
"source": [
6565
"import os\n",
66-
"import MaxText\n",
66+
"import maxtext\n",
6767
"\n",
6868
"# Get the root directory of the MaxText\n",
69-
"MAXTEXT_PKG_DIR = os.path.dirname(MaxText.__file__)\n",
69+
"MAXTEXT_PKG_DIR = os.path.dirname(maxtext.__file__)\n",
7070
"MAXTEXT_REPO_ROOT = os.path.dirname(os.path.dirname(MAXTEXT_PKG_DIR))\n",
7171
"MAXTEXT_ASSETS_ROOT = os.path.join(MAXTEXT_REPO_ROOT, \"src\", \"maxtext\", \"assets\")\n",
7272
"\n",

src/maxtext/examples/sft_llama3_demo_gpu.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,13 @@
185185
"\n",
186186
"import jax\n",
187187
"import jax.numpy as jnp\n",
188-
"import MaxText\n",
188+
"import maxtext\n",
189189
"from maxtext.configs import pyconfig\n",
190190
"from maxtext.trainers.post_train.sft import train_sft\n",
191191
"\n",
192-
"MAXTEXT_REPO_ROOT = os.path.dirname(MaxText.__file__)\n",
193-
"print(f\"MaxText installation path: {MAXTEXT_REPO_ROOT}\")\n",
192+
"MAXTEXT_REPO_ROOT = os.path.dirname(os.path.dirname(maxtext.__file__))\n",
193+
"print(f\"MaxText installation path: {MAXTEXT_REPO_ROOT}\")\n"
194+
,
194195
"\n",
195196
"print(f\"JAX version: {jax.__version__}\")\n",
196197
"print(f\"JAX devices: {jax.devices()}\")\n",

src/maxtext/scratch_code/demo_from_config.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
}
4949
],
5050
"source": [
51-
"import MaxText as mt\n",
51+
"import maxtext as mt\n",
5252
"from maxtext.configs import pyconfig\n",
5353
"import numpy as np\n",
54-
"from MaxText.input_pipeline import _input_pipeline_utils\n",
54+
"from maxtext.input_pipeline import input_pipeline_utils\n",
5555
"import os\n",
5656
"from maxtext.common import common_types\n",
5757
"import jax\n",

src/maxtext/utils/layerwise_quantization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
Example cmd:
2121
22-
python3 -m MaxText.layerwise_quantization src/maxtext/configs/base.yml \
22+
python3 -m maxtext.utils.layerwise_quantization src/maxtext/configs/base.yml \
2323
tokenizer_path=${TOKENIZER_PATH?} load_parameters_path=${LOAD_PARAMS_PATH?} \
2424
model_name=deepseek2-16b ici_fsdp_parallelism=1 ici_autoregressive_parallelism=1 \
2525
ici_tensor_parallelism=-1 scan_layers=false weight_dtype=bfloat16 per_device_batch_size=1 \

src/maxtext/utils/muon_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
This module can also be run as a script to inspect the generated dimension
2323
numbers for a specific model. Example:
24-
python3 -m MaxText.muon_utils qwen3-4b True
24+
python3 -m maxtext.utils.muon_utils qwen3-4b True
2525
"""
2626

2727

tools/data_generation/generate_distillation_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
This generated dataset can be used to fine-tune a student model.
2121
2222
Example command:
23-
python3 -m MaxText.generate_distillation_data \
23+
python3 -m tools.data_generation.generate_distillation_data \
2424
--dataset-path HuggingFaceH4/ultrachat_200k --data-split train_sft --data-columns messages \
2525
--tokenizer-path deepseek-ai/DeepSeek-V2-Lite-chat \
2626
--hf-access-token <access token> \
@@ -37,7 +37,7 @@
3737
`max-target-length` is the max length of prompt tokens and expected completion tokens.
3838
Set `--remove-local-dataset-files` to remove dataset files created locally after uploading to Hugging Face or GCS.
3939
`upload-to-hf` will upload the dataset to Hugging Face and `upload-to-gcs` will upload the dataset to GCS.
40-
For more information, check out `python3 -m MaxText.generate_distillation_data --help`.
40+
For more information, check out `python3 -m tools.data_generation.generate_distillation_data --help`.
4141
Note:
4242
Make sure to run maxengine server in a new terminal before executing this command. Example command to run maxengine server:
4343
python3 -m maxtext.inference.maxengine.maxengine_server src/maxtext/configs/base.yml \

tools/weight_inspector/weight_inspector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
Usage:
1919
20-
python3 -m MaxText.weight_inspector --lhs left_hand.pkl --rhs right_hand.pkl
20+
python3 -m tools.weight_inspector.weight_inspector --lhs left_hand.pkl --rhs right_hand.pkl
2121
2222
"""
2323

0 commit comments

Comments
 (0)