Skip to content
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

Add on-device runner and v5e benchmark model configs #1199

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

raymondzouu
Copy link
Collaborator

@raymondzouu raymondzouu commented Jan 24, 2025

Description

Adding on-device runner to benchmark_runner.py. This will run the model benchmark on the current device rather than launching it as an xpk workload. The benchmark script must be ran on all workers. This will allow our XLML perf tests to run our latest benchmark model configs.

This change introduces a new command-line flag that specifies which runner to use (xpk, on-device). Usage is as follows:

xpk runner:

python3 benchmarks/benchmark_runner.py xpk --project=<project> --zone=<zone> --device_type=v5litepod-256 --num_slices=1  --cluster_name=<cluster> --base_output_directory=gs://<your-bucket> --model_name="default_16b_v5e_256" --base_docker_image maxtext_base_image

on-device runner:

python3 benchmarks/benchmark_runner.py on-device --base_output_directory=gs://<your-bucket> --model_name="default_16b_v5e_256" --run_name=test-run

Tests

http://shortn/_grjxE2vPHD

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

Copy link
Collaborator

@Obliviour Obliviour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great improvements here! Adding v5e configs and a maxtext direct way of running these commands is awesome.

Can you add details on this way of directly running maxtext_xpk_runner.py in the readme file in the bnechmarks directory?

@raymondzouu raymondzouu force-pushed the raymondzou-on-device-runner-updated branch 2 times, most recently from 9192249 to 8032ce2 Compare January 27, 2025 22:08
@raymondzouu raymondzouu requested a review from Obliviour January 27, 2025 22:08
@raymondzouu raymondzouu assigned gobbleturk and unassigned Obliviour Jan 27, 2025
@raymondzouu raymondzouu force-pushed the raymondzou-on-device-runner-updated branch from 8032ce2 to f64c51a Compare January 28, 2025 20:56
@copybara-service copybara-service bot merged commit ce4cd52 into main Jan 28, 2025
15 checks passed
@copybara-service copybara-service bot deleted the raymondzou-on-device-runner-updated branch January 28, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants