Skip to content

Elastic update #1866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MaxText/configs/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -745,4 +745,4 @@ projector_output_dim_for_vit: 4096
rope_theta_for_vit: 10000
vision_output_dim_for_vit: 4096
pixel_shuffle_ratio_for_vit: 0.5
projector_dropout_for_vit: 0.0
projector_dropout_for_vit: 0.0
4 changes: 4 additions & 0 deletions MaxText/elastic_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def elastic_handler(
)
with mesh:
data_iterator, _ = create_data_iterator(config, mesh)
input_data_shardings = maxtext_utils.get_input_data_sharding(config, mesh)

step, snapshot_jax_arrays, _ = elastic_manager.get_resharded_snapshot(mesh)

Expand Down Expand Up @@ -183,6 +184,7 @@ def elastic_handler(
example_batch,
learning_rate_schedule,
metric_logger,
input_data_shardings,
)


Expand Down Expand Up @@ -301,6 +303,7 @@ def train_loop(config, elastic_manager, recorder, state=None):
example_batch,
learning_rate_schedule,
metric_logger,
input_data_shardings,
) = ret

if step == start_step:
Expand Down Expand Up @@ -335,6 +338,7 @@ def train_loop(config, elastic_manager, recorder, state=None):
example_batch,
learning_rate_schedule,
metric_logger,
input_data_shardings,
) = ret
except exceptions.StopTraining as error:
max_logging.log(f"Training stopped: {str(error)}")
Expand Down
Loading