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

Offline MLPerf Benchmarking #483

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

patemotter
Copy link
Collaborator

@patemotter patemotter commented Nov 21, 2024

Description

Adds offline MLPerf benchmarking to run Llama2-70B v6e-8. Requires the changes in related MaxText PR to be merged in order to work correctly.

Tests

Ran e2e using the dev environment. Confirmed completion and correct uploading of metrics after the run.

Instruction and/or command lines to reproduce your tests:

Running the maxtext_inference_offline_benchmark DAG in the dev environment.

List links for your tests (use go/shortn-gen for any internal link):

Test history in dev environment: http://shortn/_QYByqVphuT

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 one-shot tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

Fix.

.

.

.

Working except for metrics upload.

Working

Formatting fixes.
Copy link
Collaborator

@singh-mitali singh-mitali left a comment

Choose a reason for hiding this comment

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

Thanks - looks great. Left some comments.

run_model_cmds = (
"source .env/bin/activate",
"cd maxtext/MaxText/inference_mlperf/trillium",
"gsutil cp gs://cloud-tpu-inference-public/mlcommons/inference/language/llama2-70b/data/processed-openorca/open_orca_gpt4_tokenized_llama.sampled_24576.pkl /tmp/processed-data.pkl",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move this to set_up_cmds after installing loadgen

# Setup MaxText
git_clone_maxtext,
f"cd maxtext && bash setup.sh MODE={test_mode.value} && cd ..",
"pip install torch --index-url https://download.pytorch.org/whl/cpu",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also add pip install -r maxtext/MaxText/inference_mlperf/requirments.txt

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is already done within MaxText's bash setup.sh.

Copy link
Collaborator

@singh-mitali singh-mitali Nov 21, 2024

Choose a reason for hiding this comment

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

No - these are inference specific packages hence in inference_mlperf dir - e.g. nltk for accuracy script. setup installs the requirements in maxtext dir.

Copy link
Collaborator Author

@patemotter patemotter Nov 21, 2024

Choose a reason for hiding this comment

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

Ah I see.

# Setup MaxText
git_clone_maxtext,
f"cd maxtext && bash setup.sh MODE={test_mode.value} && cd ..",
"pip install torch --index-url https://download.pytorch.org/whl/cpu",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have not needed to install torch separately on my runs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was being used in other MaxText-based tests. I will see what happens with it removed.

"cd inference/loadgen && pip install . && cd ../..",
)

run_model_cmds = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we also dump following info as part of logs: maxtext commit id, jax and libtpu versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants