feat: migrate pipeline to nnx#2885
Open
mesakhcienet wants to merge 2 commits intoAI-Hypercomputer:mainfrom
Open
feat: migrate pipeline to nnx#2885mesakhcienet wants to merge 2 commits intoAI-Hypercomputer:mainfrom
mesakhcienet wants to merge 2 commits intoAI-Hypercomputer:mainfrom
Conversation
6875da8 to
f34b1a3
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
12a3907 to
2c16599
Compare
64dc147 to
9e4518e
Compare
631a73e to
ac97a1d
Compare
1849f0b to
669dc01
Compare
f65a846 to
f803e07
Compare
8883076 to
2e46721
Compare
charlesli640
requested changes
Mar 5, 2026
Collaborator
charlesli640
left a comment
There was a problem hiding this comment.
- do code format clean up
- run pre-commit checking
- Don't make unnecessary changes, maybe introduced from rebase and incorrect conflict solving.
2d742f9 to
fc3fe0b
Compare
2e46721 to
b732cb3
Compare
34d16bc to
c715fcd
Compare
Adding nnx_decoders.py in parallel with decoders.py
1. Dup and modifiy decoders.py on new file nnx_decoders.py
2. add new config pure_nnx_decoder to control if model will use NNXDecoder, default false for now
3. modify relative code to accomodate the change
4. add/modify unit test
618de58 to
e7656b2
Compare
1. Update nnx_decoders.py, enable pipeline support in nnx_decoders.py. 2. Add NNX-based pipeline into pipeline.py.
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
implement nnx-based pipeline.
This PR extends PR#2831
Main changes:
NNXPipeline, which is a nnx-based pipeline class.Tests
we run the pipeline process with command below:
MODEL_NAME=llama2-7b python -m MaxText.train src/maxtext/configs/base.yml \ run_name=pipeline_test_${MODEL_NAME}_nnx \ base_output_directory=/dev/shm/pipeline_test_nnx \ model_name=${MODEL_NAME}\ dataset_type=synthetic \ steps=15 \ debug_sharding=true \ per_device_batch_size=2 \ max_target_length=32 \ ici_pipeline_parallelism=2 \ num_pipeline_microbatches=4 \ num_layers_per_pipeline_stage=2 \ enable_checkpointing=false \ enable_nnx=true \ pure_nnx_decoder=true \ scan_layers_per_stage=false \ async_checkpointing=false > nnx-porting-log/pipeline/custom_${MODEL_NAME}.log 2>&1Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.