Commit f7cfa7b
PR #3252: Migrate remaining src/MaxText utils to src/maxtext/utils
Imported from GitHub PR #3252
# Description
* Move the remaining utils from `src/MaxText` to `src/maxtext/utils`
# Tests
Successfully ran vllm_decode:
```
python3 -m maxtext.inference.vllm_decode src/maxtext/configs/base.yml \
model_name=qwen3-30b-a3b \
tokenizer_path=Qwen/Qwen3-30B-A3B \
vllm_hf_overrides='{architectures: ["MaxTextForCausalLM"]}' \
ici_tensor_parallelism=4 \
hbm_utilization_vllm=0.5 \
prompt="Suggest some famous landmarks in London." \
decode_sampling_temperature=0.0 \
decode_sampling_nucleus_p=1.0 \
decode_sampling_top_k=0.0 \
use_chat_template=True
```
```
python3 -m maxtext.utils.generate_param_only_checkpoint src/maxtext/configs/base.yml \
base_output_directory=<base_output_directory> \
load_parameters_path=<load_parameters_path> \
run_name=<run_name> \
model_name=gemma-2b \
force_unroll=true
```
# Checklist
Before submitting this PR, please make sure (put X in square brackets):
- [x] I have performed a self-review of my code. For an optional AI review, add the `gemini-review` label.
- [x] I have necessary comments in my code, particularly in hard-to-understand areas.
- [x] I have run end-to-end tests tests and provided workload links above if applicable.
- [x] I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.
Copybara import of the project:
--
62f4d58 by Branden Vandermoon <bvandermoon@google.com>:
Migrate remaining src/MaxText utils to src/maxtext/utils
Merging this change closes #3252
COPYBARA_INTEGRATE_REVIEW=#3252 from AI-Hypercomputer:bvandermoon-repo-restructure 62f4d58
PiperOrigin-RevId: 8758843521 parent 5a4a9c3 commit f7cfa7b
38 files changed
Lines changed: 76 additions & 82 deletions
File tree
- src
- MaxText
- maxtext
- checkpoint_conversion/standalone_scripts
- configs
- inference
- trainers/pre_train
- utils
- tests
- end_to_end
- gpu/a3
- tpu
- gemma2
- 27b
- 2b
- 9b
- gemma3
- 12b
- 27b
- 4b
- gemma
- 2b
- 7b
- llama2
- 13b
- 70b
- 7b
- llama3.1
- 70b
- 8b
- llama3.3/70b
- llama3
- 70b
- 8b
- mistral/7b
- mixtral/8x7b
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
Lines changed: 13 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
36 | 30 | | |
37 | 31 | | |
38 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments