Skip to content

Bump torchao + add unit tests for torchao kernels #9396

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

Merged
merged 5 commits into from
Mar 20, 2025
Merged

Conversation

metascroy
Copy link
Contributor

@metascroy metascroy commented Mar 19, 2025

Summary

This PR bumps the torchao pin and adds unit tests and documentation for the lowbit torchao kernels.

Test plan

New CI test

Copy link

pytorch-bot bot commented Mar 19, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 1 Cancelled Job, 2 Pending

As of commit ad95321 with merge base 7a2a300 (image):

NEW FAILURE - The following job has failed:

CANCELLED JOB - The following job was cancelled. Please retry:

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 19, 2025
@metascroy metascroy force-pushed the torchao-up branch 2 times, most recently from 3f4b66d to 531d8ca Compare March 20, 2025 00:33
@metascroy metascroy changed the title Torchao up Bump torchao + add unit tests for torchao kernels Mar 20, 2025
@metascroy metascroy requested a review from Jack-Khuu March 20, 2025 00:35
@metascroy metascroy marked this pull request as ready for review March 20, 2025 00:36
Copy link
Contributor

@jackzhxng jackzhxng left a comment

Choose a reason for hiding this comment

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

Thanks 🙏🏻

-d fp32

# Test run
./cmake-out/examples/models/llama/llama_main --model_path=$MODEL_OUT --tokenizer_path=$TOKENIZER --prompt="Once upon a time,"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do a simple non-brittle sanity check? e.g. output length > 0 or something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the main concern is whether it runs. If it runs, it will produce output.

@@ -380,6 +380,79 @@ Please refer to [this tutorial](https://pytorch.org/executorch/main/llm/llama-de
### Android
Please refer to [this tutorial](https://pytorch.org/executorch/main/llm/llama-demo-android.html) to for full instructions on building the Android LLAMA Demo App.

## Running with low-bit kernels

We now give instructions for quantizating and running your model with low-bit kernels. These are still experimental, and require you do development on an Arm-based Mac. Also note that low-bit quantization often requires QAT (quantization-aware training) to give good quality results.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth saying that these don't work with dynamic shapes yet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@jackzhxng jackzhxng added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Mar 20, 2025
@metascroy metascroy merged commit 1a9a59b into main Mar 20, 2025
251 of 254 checks passed
@metascroy metascroy deleted the torchao-up branch March 20, 2025 20:12
oscarandersson8218 pushed a commit to oscarandersson8218/executorch that referenced this pull request Mar 21, 2025
### Summary
This PR bumps the torchao pin and adds unit tests and documentation for
the lowbit torchao kernels.

### Test plan
New CI test
DannyYuyang-quic pushed a commit to CodeLinaro/executorch that referenced this pull request Apr 2, 2025
### Summary
This PR bumps the torchao pin and adds unit tests and documentation for
the lowbit torchao kernels.

### Test plan
New CI test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants