Revert "use Pytree as base type in nnx_wrappers"#3
Merged
Conversation
This reverts commit 8840296. Note: This commit should be reverted when flax version is upgraded to anything >= 0.11.0. Right now, JAX 0.6.0 does not support any flax version >= 0.10.7, hence this commit is required as flax started exposing PyTree after 0.11.0.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This reverts commit 8840296. This commit was using Pytree as base type in nnx_wrappers. Currently, with JAX 0.6.0 on ROCm, the latest flax version supported is 0.10.7, hence this commit is not valid and breaks the execution.
Note: This commit should be reverted when flax version is upgraded to anything >= 0.11.0. Right now, JAX 0.6.0 does not support any flax version >= 0.10.7, hence this commit is required as flax started exposing PyTree after 0.11.0.
Notice 1: Once all tests pass, the "pull ready" label will automatically be assigned.
This label is used for administrative purposes. Please do not add it manually.
Notice 2: For external contributions, our settings currently require an approval from a MaxText maintainer to trigger CI tests.
Tests
I ran train.py with the following args:
python -m MaxText.train MaxText/configs/base.yml run_name=test hardware=gpu steps=5 model_name=llama2-7b attention=cudnn_flash_te enable_checkpointing=False ici_expert_parallelism=1 ici_fsdp_parallelism=-1 ici_data_parallelism=1 remat_policy=minimal scan_layers=True dataset_type=synthetic logits_dot_in_fp32=False dtype=bfloat16 weight_dtype=bfloat16 per_device_batch_size=1 max_target_length=2048 shardy=False
It was able to successfully complete execution.
Checklist
Before submitting this PR, please make sure (put X in square brackets):