Skip to content

Conversation

@jackzhxng
Copy link
Contributor

@jackzhxng jackzhxng commented Mar 11, 2025

Summary

Add a proxy for an export_llama performance regression test by comparing the ops in the graph before and after the PR. The export happens without loading a checkpoint or params file, which means that all of the base ModelArgs values for llama_transformer will be used.

Test plan

N/A

@jackzhxng jackzhxng requested a review from kimishpatel March 11, 2025 20:29
@jackzhxng jackzhxng requested a review from lucylq as a code owner March 11, 2025 20:29
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 11, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9158

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 54cd638 with merge base 306b649 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 11, 2025
Base automatically changed from jz/fix-regression to main March 11, 2025 21:06
@swolchok swolchok removed their request for review March 11, 2025 21:22
@jackzhxng jackzhxng added the release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava label Mar 13, 2025
# Ops expected to be found in the default exported llama_transformer. Obtained through
# print_delegation_info from the backend_debug module, which is displayed with
# export_llama under --verbose.
BASE_EXPECTED_OPS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be a little risky to test. If the IR changes which is a common possibility this count will change and we'll have to keep fixing this.

# we cannot test quantization args in this way
# since quantization requires promoting meta tensors
# to the cpu device, which requires real weights.
export_args_str = """
Copy link
Contributor

Choose a reason for hiding this comment

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

Also why do this? Why not just generate the args directly and use them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I feel like it's more clear to read?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm generally it's not good practice to hard code strings like this as they'll tend to change. The underlying args they refer to tend to be more stable so i'd say switch over to the args directly.

@facebook-github-bot
Copy link
Contributor

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jackzhxng jackzhxng force-pushed the jz/regression-test-llama-perf branch from 738cdf0 to d3d8e7d Compare March 22, 2025 22:50
@jackzhxng jackzhxng force-pushed the jz/regression-test-llama-perf branch from d3d8e7d to 785904b Compare March 23, 2025 01:54
@facebook-github-bot
Copy link
Contributor

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jackzhxng jackzhxng force-pushed the jz/regression-test-llama-perf branch from c963335 to 8ca7e05 Compare March 25, 2025 15:10
@facebook-github-bot
Copy link
Contributor

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jackzhxng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jackzhxng jackzhxng merged commit 2f65c3a into main Mar 26, 2025
82 checks passed
@jackzhxng jackzhxng deleted the jz/regression-test-llama-perf branch March 26, 2025 13:07
kirklandsign pushed a commit that referenced this pull request Apr 11, 2025
### Summary
Add a proxy for an `export_llama` performance regression test by
comparing the ops in the graph before and after the PR. The export
happens without loading a checkpoint or params file, which means that
all of the base `ModelArgs` values for `llama_transformer` will be used.

### Test plan
N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants